Main stylesheet
AU01_Rosetta_CASEDOC-to-LxAdv_courtcase.xsl
Documentation
Description
***This XSLT conversion file is a stand-alone, generated release created from a module based source code. Any changes to this conversion must be propagated to its original source. ***
This file is not intended to be edited directly, except in a time critical situation such as a "sev1" webstar.
Please contact Content Architecture for support and for ensuring the source code is updated as needed and a new stand-alone delivery is released.
Compiled: 2018-01-08T15:04:08.351+05:30
When matching the / root element, just process child nodes.
Description
comments | text | PIs END
Namespace
No namespace
Match
/
Mode
#default
Import precedence
0
Source
<xsl:template match="/"><xsl:apply-templates/><!-- for fab pipeline conversions, create an override template on the root node that defines tunnel parameters for $documentLNI and $targetPlatform. Here is JCD example, note $outputTgroupXmlID may not be necessary for your conversion --><!--xsl:apply-templates>
<xsl:with-param name="outputTgroupXmlID" tunnel="yes" as="xs:boolean" select="false()"/>
<xsl:with-param name="documentLNI" tunnel="yes" as="xs:string" select="if (contains( */@guid:guid , 'urn:contentItem:' )) then
substring-after( */@guid:guid , 'urn:contentItem:' )
else if (*/@guid:guid) then
*/@guid:guid
else if (contains( */source_doc:metadata/source_mncrdocmeta:chunkinfo/source_mncrdocmeta:lnlni/@lnlni , 'urn:contentItem:' )) then
substring-after( */source_doc:metadata/source_mncrdocmeta:chunkinfo/source_mncrdocmeta:lnlni/@lnlni , 'urn:contentItem:' )
else if (*/source_doc:metadata/source_mncrdocmeta:chunkinfo/source_mncrdocmeta:lnlni/@lnlni) then
*/source_doc:metadata/source_mncrdocmeta:chunkinfo/source_mncrdocmeta:lnlni/@lnlni
else 'UNKNOWN' "/>
<xsl:with-param name="targetPlatform" tunnel="yes" as="xs:string" select=" 'fabPipeline' "/>
</xsl:apply-templates--></xsl:template>
Template
lncr:*
Documentation
Description
lncr:* are just pass through, just process child elements. lncr:metadata is suppressed.
Namespace
No namespace
Match
lncr:*
Mode
#default
Import precedence
0
Source
<xsl:template match="lncr:*"><!-- drop wrapper applied to any lncr:* elements and ignore all children but elements --><xsl:apply-templates select="*"/></xsl:template>
Template
lncr:metadata
Namespace
No namespace
Match
lncr:metadata
Mode
#default
Import precedence
0
Source
<xsl:template match="lncr:metadata"/>
Template
* | @*
Documentation
Description
* | @* (unmatched element and attribute nodes). This template will throw an error, unless
$outputUnmatchedElements is set to 'noErrors' as a parameter to the conversion. Named
template "outputErrorMessage" is called which will use the xsl:message instruction
to generate an error message. If $outputUnmatchedElements is set to 'ICCE' (the default),
then the error message will be in the form of an exception element.
Example exception handling output:
<exception timestamp="2017-01-04 14:54:22">
<filename>test.xml</filename>
<status>W</status>
<code>402</code>
<context>/jcd:judicialCourtDecision[1]/jcd:information[1]/courtcase:history[1]/courtcase:historySummary[1]/courtcase:historyItem[1]/citation:citation[1]/citation:content[1]/citation:contentSpan[1]/@citation:contentSpanRole</context>
<message>Unexpected Attribute: name()=citation:contentSpanRole encountered in source document! Attribute value is=hierarchyReference</message>
</exception>
<xsl:template match="* | @*"><!-- matching this pattern is an error --><xsl:param name="errorStatus" tunnel="yes" as="xs:string" select=" 'W' "/><!-- default is W for warning. If 'E' is passed, then some systems will ensure the target document is not passed along in the pipeline --><xsl:param name="targetPlatform" tunnel="yes" as="xs:string" select=" 'ROCKET' "/><!-- default is ROCKET, which outputs exception element via xsl:message. fabPipeline outputs to target document --><xsl:param name="documentLNI" tunnel="yes" as="xs:string" select=" 'UNKNOWN' "/><!-- Used for fabPipeline only, the LNI of the document since filename is not available --><!-- calling the elementOrAttributeCopy named template to copy the node as is --><!-- if element node, wrap withinin error element --><!-- if attribute node, also output an error attribute --><xsl:choose><xsl:when test=" $outputUnmatchedElements = ( 'ROCKET' , 'ICCE' ) or $targetPlatform = 'fabPipeline' "><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select="concat( if (self::*) then 'Unexpected Element: name()=' (: first item is either element (self::* = true()) or attribute (otherwise) :) else 'Unexpected Attribute: name()=' , name() , (: second item is element or attribute name :) ' encountered in source document!' , (: third item :) if (self::* and text()) then (: last item is empty string if element and no text() nodes, or if attribute and no value. :) concat( ' Text value is=' , string-join( text() , '' ) ) (: Otherwise provide @ value or text() value :) else if (not(self::*) and . != '') then concat( ' Attribute value is=' , . ) else '' )"/><xsl:with-param name="errorType" as="xs:string" select=" $targetPlatform "/><!-- ROCKET or fabPipeline error type --><xsl:with-param name="errorCode" as="xs:string" select=" if (self::*) then '401' else '402' "/><!-- 401 if element node, 402 if attribute node --><xsl:with-param name="context" as="xs:string"><xsl:call-template name="generateXPath"/></xsl:with-param><xsl:with-param name="status" as="xs:string" select=" $errorStatus "/><xsl:with-param name="documentLNI" as="xs:string" select=" $documentLNI "/><!-- fabPipeline only --></xsl:call-template></xsl:when><xsl:when test=" $outputUnmatchedElements = 'noErrors' "><xsl:sequence select="."/></xsl:when><xsl:when test="not($outputErrors)"/><xsl:when test="self::*"><!-- self:* is false for attribute nodes --><error:error><xsl:sequence select="."/></error:error><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select="concat( 'Unexpected Element: ' , name() , ' encountered in source document!' )"/></xsl:call-template></xsl:when><xsl:otherwise><!-- must be an attribute --><xsl:attribute name="error:error" select="'error: unexpected attribute!'"/><xsl:sequence select="."/><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select="concat( 'Unexpected Attribute: ' , name(..) , '/@' , name() , ' (= ' , . , ') encountered in source document!' )"/></xsl:call-template></xsl:otherwise></xsl:choose></xsl:template>
Template
outputErrorMessage
Documentation
Description
Instructions
Global functions apply primarily to XSL style conversions but would include such items
as error messaging, etc.
Description
outputErrorMessage Named Template
This named template is called whenever the XSLT needs to throw an error or warning.
It will use the xsl:message instruction to generate an error message. If $errorType
is set to 'ROCKET' (the default), then the error message will be in the form of an
exception element.
Example exception handling output:
<exception timestamp="2017-01-04 14:54:22">
<filename>test.xml</filename>
<status>W</status>
<code>402</code>
<context>/jcd:judicialCourtDecision[1]/jcd:information[1]/courtcase:history[1]/courtcase:historySummary[1]/courtcase:historyItem[1]/citation:citation[1]/citation:content[1]/citation:contentSpan[1]/@citation:contentSpanRole</context>
<message>Unexpected Attribute: name()=citation:contentSpanRole encountered in source document! Attribute value is=hierarchyReference</message>
</exception>
Description
configurationManagementInformation xmlns="urn:x-lexisnexis:configuration-management:1">
<title>Globally Shared Functions and Named Templates</title>
<purpose>This stylesheet module contains XSLT functions and named templates that are globally shared regardless of transformation direction or tier, such as the named template for processing errors, etc.</purpose>
<versionInfo>
<version>
<rev>-00</rev>
<date>20-Mar-2013</date>
<author>S. Byland</author>
<description>Initial version.</description>
</version>
<version>
<rev>A00</rev>
<date>26-Jan-2016</date>
<author>S. Byland</author>
<description>Some general cleanup of comments. Also commented out elementOrAttributeCopy named template as this method was not really used. There is some code in the CRM LA-to-MNCR baseline that will need to be modified so as to not use this named template anymore.</description>
</version>
</versionInfo>
</configurationManagementInformation
global custom functions
named template rules START
error detected; throw a message to the output START
<xsl:template name="outputErrorMessage"><xsl:param name="CurrentDBD" required="no" as="xs:string" select=" 'notApplicable' "/><xsl:param name="messageText" as="xs:string*" select=" 'Error!' "/><!-- text passed in by caller --><xsl:param name="errorType" as="xs:string*" select=" 'ROCKET' "/><xsl:param name="errorCode" as="xs:string*" select=" '401' "/><xsl:param name="context" as="xs:string*" select=" '/unknown' "/><xsl:param name="status" as="xs:string*" select=" 'W' "/><xsl:param name="documentLNI" as="xs:string*" select=" 'UNKNOWN' "/><!-- fabPipeline only --><xsl:choose><xsl:when test=" $errorType = 'debug' "><!-- Example of how debug mode might be used; maybe auto create something like these lines after each template rule when building the monolithic and a certain flag is passed?
<xsl:if test=" $debug and contains( . , 'Hello Errors' ) ">
<xsl:call-template name="outputErrorMessage">
<xsl:with-param name="messageText" as="xs:string" select=" 'Template: xh:p[translate( normalize-space( string-join( descendant-or-self::*/text() , ... ]' "/>
<xsl:with-param name="errorType" as="xs:string" select=" 'debug' "/>
<xsl:with-param name="context" as="xs:string">
<xsl:call-template name="generateXPath"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
end example debug mode --><xsl:message><xsl:element name="debug" inherit-namespaces="no" namespace=""><xsl:attribute name="timestamp" select=" $dateTime "/><xsl:element name="message" inherit-namespaces="no" namespace=""><xsl:if test=" $context != '/unknown' "><xsl:text>Context/XPath: </xsl:text><xsl:sequence select="$context"/><xsl:text>. </xsl:text></xsl:if><xsl:sequence select="$messageText"/></xsl:element></xsl:element></xsl:message></xsl:when><xsl:when test=" upper-case($errorType) = 'ICCE' or upper-case($errorType)='ROCKET' or $errorType = 'fabPipeline' "><xsl:message><xsl:element name="exception" inherit-namespaces="no" namespace=""><xsl:attribute name="timestamp" select=" $dateTime "/><xsl:element name="filename" inherit-namespaces="no" namespace=""><xsl:sequence select="$fileName"/></xsl:element><xsl:element name="status" inherit-namespaces="no" namespace=""><xsl:sequence select="$status"/></xsl:element><xsl:element name="code" inherit-namespaces="no" namespace=""><xsl:sequence select="$errorCode"/></xsl:element><xsl:element name="context" inherit-namespaces="no" namespace=""><xsl:sequence select="$context"/></xsl:element><xsl:element name="message" inherit-namespaces="no" namespace=""><xsl:sequence select="$messageText"/></xsl:element></xsl:element></xsl:message><xsl:if test=" $errorType = 'fabPipeline' "><xsl:choose><xsl:when test=" $errorCode = '402' "><xsl:attribute name="lnf:exception" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:value-of select="$messageText"/><xsl:text>; sourceXPath = </xsl:text><xsl:value-of select="$context"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:element name="exception" inherit-namespaces="no" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:attribute name="timestamp" select=" $dateTime "/><xsl:element name="LNI" inherit-namespaces="no" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:sequence select="$documentLNI"/></xsl:element><xsl:element name="bundle" inherit-namespaces="no" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:sequence select="$bundleID"/></xsl:element><xsl:element name="code" inherit-namespaces="no" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:sequence select="$errorCode"/></xsl:element><xsl:element name="sourceXPath" inherit-namespaces="no" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:sequence select="$context"/></xsl:element><xsl:element name="message" inherit-namespaces="no" namespace="urn:x-lexisnexis:conversion:global:functions:1"><xsl:sequence select="$messageText"/></xsl:element></xsl:element></xsl:otherwise></xsl:choose></xsl:if></xsl:when><!--for DBD errors, note template matched element name directly in the output file--><xsl:when test="$errorType = 'DBD'">DBDerr:<xsl:value-of select="name()"/><!--<xsl:value-of select="error()"/>--><xsl:if test="not($CurrentDBD='DeScopedDbd' or $CurrentDBD = 'notApplicable' )"><xsl:message><xsl:text>DBDerr:</xsl:text><xsl:value-of select="$CurrentDBD"/><xsl:text>:</xsl:text><xsl:value-of select="name()"/></xsl:message></xsl:if></xsl:when><xsl:otherwise><xsl:message><xsl:value-of select="$messageText"/><!-- just output the message text to the output --><xsl:value-of select="$context"/></xsl:message></xsl:otherwise></xsl:choose></xsl:template>
Template
generateXPath
Documentation
Description
generateXPath Named Template
This named template is used to create the XPath leading to the current node in the
form of a string, such as "/jcd:judicialCourtDecision[1]/jcd:information[1]/courtcase:history[1]/courtcase:historySummary[1]/courtcase:historyItem[1]/citation:citation[1]/citation:content[1]/citation:contentSpan[1]/@citation:contentSpanRole".
Parameter $includeBrackets can be set to false() to suppress the predicate output
if desired.
Description
error detected; throw a message to the output END
generate and output the source XPath START
@SBy: 2016-09-20 ROM 1218 IRM Strategic: updated to allow optionally outputting without brackets (predicates indicating sibling order)
<xsl:template name="generateXPath" as="xs:string"><xsl:param name="includeBrackets" as="xs:boolean" select="true()"/><xsl:sequence select=" string-join( (: use string join function to insert the '/' chars of the XPath :) ( '' , (: Build a sequence of strings. First item is empty to ensure XPath starts with a '/' :) ( for $i in ancestor-or-self::* return (: Walk the ancestor-or-self:: axis and return the name of each element followed by position in brackets :) concat( name($i) , (: next item is the element name followed by position in brackets :) if ($includeBrackets) then concat( '[' , (: open bracket, then count preceding sibling elements of same name and add 1; convert to string :) string( count($i/preceding-sibling::*[name(.) = name($i)]) + 1) , ']' ) (: close bracket. This for loop returns sequence of strings in form of 'element-name[#]' :) else '' ) ) , (: Last item in sequence is to add the attribute name if necessary, since :) if (self::*) then () (: ancestor-or-self::* won't include 'self' if this is an attribute :) else concat( '@' , name() ) ) , '/' ) "/><!-- Use '/' as the string separator since this is an XPath --></xsl:template>
Template
combineTrees
Documentation
Description
combineTrees Named Template
This named template is used to combine the content from following sibling elements
of the same base name into a single element, such as lnv:TEXT-1, lnv:TEXT-2, etc.,
into a single lnv:TEXT-1 element, when these elements contain nested hierarchical
content requiring the hierarchies to be knitted back together. It assumes the sibling
element descendants are structured the same way, and that the nodes can be combined
at specific levels identifed by $combiningElements parameter.
The base element name (such as "lnv:TEXT-") must be passed as parameter $baseEleName,
and the sibling nodes passed as $nodesToCombine.
Recursion is used to process through all the siblings provided in $nodesToCombine.
<xsl:template name="combineTrees" as="element()"><!-- combines the content from following sibling elements of the same base name into a single element (into the "-1" element of same name) --><!-- assumes the sibling element descendants are structured the same way, and that the nodes can be combined at specific levels identifed by $combiningElements parameter --><xsl:param name="baseEleName" tunnel="yes" as="xs:string"/><!-- base element name before the digit, such as 'lnv:TEXT-' --><xsl:param name="nodesToCombine" as="document-node()"/><!-- all of the, or the remaing, sibling segments to be combined under one element --><xsl:param name="combiningElements" as="xs:string*"/><!-- sequence of element names (strings) where node combining can occur --><xsl:variable name="updatedTree" as="element()"><!-- combine first remaining segment with second remaining segment and save in this variable --><xsl:apply-templates select="$nodesToCombine/*/*[1]" mode="combineTrees"><!-- perform combinging of nodes via the combineTrees mode --><xsl:with-param name="matchingXPath" tunnel="yes" as="xs:string"><!-- node combining will occur when current XPath matches this XPath --><!-- the matching XPath is determined by first finding the last node in the document that contains text. Then, start moving up the ancestor-or-self axis until arrive at one of the elements identified in $combiningElements --><xsl:for-each select="$nodesToCombine/*/*[1]/descendant-or-self::*[text()][last()]/ancestor-or-self::*[ name() = $combiningElements ][1]"><xsl:call-template name="generateXPath"/><!-- utility that returnes the XPath of the current node --></xsl:for-each></xsl:with-param><xsl:with-param name="baseEleName" tunnel="yes" as="xs:string" select="$baseEleName"/><!-- pass on baseEleName --><xsl:with-param name="currentEleName" tunnel="yes" as="xs:string" select=" name( $nodesToCombine/*/*[1] ) "/><!-- pass on the name of the first remaining segment --><xsl:with-param name="nextEleName" tunnel="yes" as="xs:string" select=" name( $nodesToCombine/*/*[2] ) "/><!-- pass on the name of the next remaining segment --></xsl:apply-templates></xsl:variable><xsl:choose><xsl:when test="$nodesToCombine/*/*[3]"><!-- if there are 3 or more siblings, then need to recurse --><xsl:call-template name="combineTrees"><xsl:with-param name="baseEleName" tunnel="yes" as="xs:string" select="$baseEleName"/><!-- pass on baseEleName --><xsl:with-param name="nodesToCombine" as="document-node()"><!-- update nodesToContinue to first be the $updatedTree followed by all other sibling after the 2nd one --><xsl:document><!-- Forcing nodesToCombine element below to be in the empty namespace. This is necessary because even though there is no default namespace declared in this XSLT file,
there usually is when building the monolithic deliverable stylesheet (and it is set to the base: namespace URI). In that scenario, when transforming with the monolithic XSLT,
this element would be in the base: namespace, and will cause Saxon to throw various errors since the non-namespaced children being combined below are in the empty namespace.
Saxon is require to output all the namespace nodes that are in scope for each element, and to have a default namespace of base: copied for an element that is in no namespace is an error. --><nodesToCombine xmlns=""><xsl:copy-of select="$updatedTree"/><!-- first the $updatedTree containing the newly combined siblings --><xsl:copy-of select="$nodesToCombine/*/*[ position() gt 2 ]"/><!-- remaining siblings to be combined --></nodesToCombine></xsl:document></xsl:with-param><xsl:with-param name="combiningElements" as="xs:string*" select="$combiningElements"/><!-- pass on combiningElements --></xsl:call-template></xsl:when><xsl:otherwise><xsl:copy-of select="$updatedTree"/><!-- all siblings combined, just output the newly combined tree --></xsl:otherwise></xsl:choose></xsl:template>
Template
combineSiblingsOfSameName
Documentation
Description
combineSiblingsOfSameName Named Template
This named template is used to combine immediate siblings of the same name into a
single target element (instead of multiple target elements of same name).
Within the template of the first sibling, create the output element and apply-templates
on child nodes of that element first. Then use for-each to change context to the
next sibling and call this named template.
Be sure to suppress elements of the same name that have preceding siblings with that
name (elementXYX[ preceding-sibling::node()[1][ self::elementXYX ] ]).
<xsl:template name="combineSiblingsOfSameName" as="item()*"><!-- this named template assumes the first sibling's attribute and nodes were already processed, so first call to this rule is the second immediate sibling --><!-- capture name of current element --><xsl:variable name="currentEleName" as="xs:string" select="name( . )"/><!-- process child nodes; note attribute nodes are skipped in deference to the first sibling's attributes --><xsl:apply-templates select="node()"/><!-- recursively process the next immediately following sibling node if it has the same name --><xsl:for-each select="following-sibling::node()[1][ name() = $currentEleName ]"><xsl:call-template name="combineSiblingsOfSameName"/></xsl:for-each></xsl:template>
Template
node()combineTrees
Documentation
Description
combineTrees Processing Mode
mode="combineTrees" is used in conjunction with the combineTrees named template to
combine multiple siblings into a single element (see description for "combineTrees
Named Template").
For most nodes in the tree, this mode will simply copy itself to the output destination
(equivalent to the identity template).
However, if the current node is a location where a pair of siblng structures can be
combined, the combining is done as part of this mode and processing continues.
<xsl:template match="node()" mode="combineTrees"><!-- the combineTree mode is used to copy nodes at the same location in a sibling tree as following siblings in current location --><xsl:param name="matchingXPath" tunnel="yes" as="xs:string"/><!-- the path to the last node containing text in the tree to be combined into --><xsl:param name="baseEleName" tunnel="yes" as="xs:string"/><!-- base element name before the digit, such as 'lnv:TEXT-' --><xsl:param name="currentEleName" tunnel="yes" as="xs:string"/><!-- element name of the base of the tree to be combined into --><xsl:param name="nextEleName" tunnel="yes" as="xs:string"/><!-- element name of the base of the tree to be combined from --><xsl:variable name="currentXPath" as="xs:string"><!-- determine XPath of current node for later use --><xsl:call-template name="generateXPath"/></xsl:variable><xsl:copy><!-- copy over current node and attributes to the combined tree --><xsl:copy-of select="@*"/><xsl:apply-templates select="node()" mode="combineTrees"/><!-- process child nodes to be output first, then determine if nodes from other tree need to be copied over as following siblings --><xsl:if test="$matchingXPath = $currentXPath"><!-- if processing the last text-containing node in the primary tree, then need to copy over remaining nodes in following tree as siblings --><xsl:variable name="currentXPathNoBrackets" as="xs:string"><!-- create and save version of current XPath without the square brackets (predicates) --><xsl:call-template name="generateXPath"><xsl:with-param name="includeBrackets" as="xs:boolean" select="false()"/></xsl:call-template></xsl:variable><xsl:for-each select="/*/*[ name() = $nextEleName ]/descendant-or-self::*[text()][1]"><!-- now change context over to the first text-containing node in the sibling tree (the one with base element name of $nextEleName) --><xsl:for-each select="ancestor-or-self::*"><!-- start up the ancestor-or-self axis until XPaths match. Note this should end up at one of the elements identified in $combiningElements --><xsl:variable name="altTreeXPath" as="xs:string"><!-- capture the XPath to compare against current XPath; again no predicates --><xsl:call-template name="generateXPath"><xsl:with-param name="includeBrackets" as="xs:boolean" select="false()"/></xsl:call-template></xsl:variable><!-- since the base element names are different, need to only compare strings after those element names --><xsl:if test="substring-after( $altTreeXPath , $nextEleName ) = substring-after( $currentXPathNoBrackets , $currentEleName )"><xsl:copy-of select="*"/><!-- if the XPaths match, copy over the children. Note current output destination is the same spot in primary tree --></xsl:if></xsl:for-each></xsl:for-each></xsl:if></xsl:copy><!-- now need to check if there are nodes in sibling tree that need to get copied *after* current node. Only check when XPath is the same, or starts with, the matching XPath (leading to last text-containing node in primary tree) --><xsl:if test="starts-with( $matchingXPath , $currentXPath )"><xsl:variable name="currentXPathNoBrackets" as="xs:string"><!-- again, create and save version of current XPath without the square brackets (predicates) --><xsl:call-template name="generateXPath"><xsl:with-param name="includeBrackets" as="xs:boolean" select="false()"/></xsl:call-template></xsl:variable><xsl:for-each select="/*/*[ name() = $nextEleName ]/descendant-or-self::*[text()][1]"><!-- now change context just like before. The processing below is same, except the copy-of will grab different nodes --><xsl:for-each select="ancestor-or-self::*"><xsl:variable name="altTreeXPath" as="xs:string"><xsl:call-template name="generateXPath"><xsl:with-param name="includeBrackets" as="xs:boolean" select="false()"/></xsl:call-template></xsl:variable><xsl:if test="substring-after( $altTreeXPath , $nextEleName ) = substring-after( $currentXPathNoBrackets , $currentEleName )"><!-- if the XPaths match, need to copy over the following siblings of the same node as in the output destination. Just up to parent and copy child::* as long as not first one. --><xsl:copy-of select="../*[position() != 1][not( starts-with( name() , $baseEleName ) )]"/></xsl:if></xsl:for-each></xsl:for-each></xsl:if></xsl:template>
Template
node()fixSourceNesting
Documentation
Description
fixSourceNesting Processing Mode (default rule)
mode="fixSourceNesting" for any node matching this rule will simply copy itself to
the output destination (equivalent to the identity template).
It does trap elements in the lndocmeta source namespace and ensures they remain in the source namespace after copying.
Description
combined nested trees mode END
default fixSourceNesting mode START
Namespace
No namespace
Match
node()
Mode
fixSourceNesting
Import precedence
0
Source
<xsl:template match="node()" mode="fixSourceNesting"><!-- the fixSourceNesting mode can be used to resolve issues such as p/lnvxe:text/lnvxe:note when, in the target, note and p are siblings --><!-- default for this mode is identity template, so first copy over current node and attributes --><xsl:choose><xsl:when test=" not( self::* ) or ( contains( name() , ':' ) and not( substring-before( name() , ':' ) = 'lndocmeta' ) ) "><xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates select="node()" mode="fixSourceNesting"/><!-- process child nodes --></xsl:copy></xsl:when><xsl:otherwise><xsl:variable name="nsURI" as="xs:string" select=" if ( substring-before( name() , ':' ) = 'lndocmeta' ) then 'http://www.lexis-nexis.com/lndocmeta' else '' "/><xsl:variable name="eleName" as="xs:string" select=" if ( substring-before( name() , ':' ) = 'lndocmeta' ) then local-name() else name() "/><xsl:element name="{name()}" namespace="{$nsURI}"><xsl:copy-of select="@*"/><xsl:apply-templates select="node()" mode="fixSourceNesting"/><!-- process child nodes --></xsl:element></xsl:otherwise></xsl:choose></xsl:template>
Template
DATE_attributes
Documentation
Description
siblingToParentGrouping END
This template takes an element having @month, @day, or @year attributes and provides the provided attributes and their enhanced values back to the element.
Much of the logic is designed to create a normalized date value of YYYY-MM-DD.
@month is tested for value between 1 and 12. If other value exists, it outputs but does not create a normalized date. Leading zeros added if value is below 9.
@day is tested for value between 1 and 31. If other value exists, it outputs but does not create a normalized date. Leading zeros added if value is below 9.
@year is tested for four characters. By testing for current year value the template outputs a four digit year value when only provided with a two digit year value.
Some logic taken from DATE template in '/dataArch/XSLT/ContentArch/CRE-to-LA/modules/lnvxe/n=DATE.xsl'
This Conversion Instruction describes the conversion of Courtcase 9.20 PROD schema
in the
document.
AU cases are identified using the root element CASEDOC with attribute @type=”fulltext” and docinfo:doc-country iso-cc=”AU”.
CASEDOC becomes courtcase:courtcase. Its a root element for CaseLaw. The source attributes are:
@id becomes @xml:id,
@xml:lang, if present, suppress attribute and content, as a separate rule has been defined
to populate courtcase:courtcase/@xml:lang and @type suppress attribute and content, because the distinction made by this attribute in
source is handled by separate schema in NL.
Note: The attribute @searchtype will be suppressed from the conversion except citation markup.
The attribute xml:id is an W3C standard with a datatype of "ID". Outlined below are some of the cases
where the source ID values need to be adjusted to
conform to the xml:id standard:
Colon ":" in ID value
When a colon is found within an XML ID replace the colon ":" with an underscore "_"
as shown below:
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo.doc-lang-and-doc-country-LxAdv-ROOT_xml.lang.dita
WPK: this doc-country template is correct and tested
<xsl:template name="parse_id">
<!-\- This template returns valid ID data type value. -\->
<xsl:param name="attr_value" select="."/>
<xsl:if test="contains('0123456789', substring($attr_value, 1, 1))">
<xsl:text>_</xsl:text>
</xsl:if>
<xsl:value-of select="translate($attr_value, ':', '_')"/>
</xsl:template>
WPK: this template is correct and tested
<xsl:template match="@id">
<!-\- This template creates @xml:id target from @id source. For any non-specific cases of @id.
For specific other use cases of @id, use more specific match, such as "refpt/@id". -\->
<xsl:attribute name="xml:id">
<xsl:call-template name="parse_id">
<xsl:with-param name="attr_value" select="."/>
</xsl:call-template>
</xsl:attribute>
</xsl:template>
Vikas Rohilla : Updated the template Removed the double slash
2017-10-04 - MDS: This should not be used. Instead use the xml_lang named template
<xsl:template name="xml_lang_HK">
<!-\- This template creates @xml:lang from doc-lang and doc-country only for HK stream-\->
<xsl:attribute name="xml:lang" select="concat(docinfo/docinfo:doc-lang/@lang, '-', docinfo/docinfo:doc-country/@iso-cc)"/>
</xsl:template>
Throughout these instructions, XML character entities are used in both the source
and target
examples to ensure they are easily viewable in a variety of formats. However,
please
keep in mind that all XML character entities in the source files must be
converted to Unicode code points in the target files.
Note:
Certain XML character entities will be interpreted by the ‘browser’ or
‘Database’ as code, rather than literal (Unicode exact) character. Therefore,
we
should not convert certain xml character entities to Unicode character. Refer
the below table for your reference:
XML Character Entity
Character name
Transformation Output
Remarks
<
Less-Than Sign
<
>
Greater-Than Sign
>
&
Ampersand
&
'
Apostrophe
'
If part of PCDATA this should be converted
otherwise left as is in case of attribute value.
"
Quotation Mark
"
If part of PCDATA this should be converted
otherwise left as is in case of attribute value.
Description
Instructions
Each source element should be converted to its associated target element such that
the target element will occur in the target document in the same relative order
as
its respective source element did in the source document, so long as the target
schema does not require a specific order for that target element within that
target element's parent element (first exception), and there are no other
instructions regarding the moving of that target element (second exception).
In other words, when converting elements from the source documents, the order
of
elements as they are encountered in the source documents should in general be
maintained whenever possible, subject to the two important exceptions mentioned
in
the previous sentence and elaborated below.
Note that according to this rule, the order of particular target elements within a
parent target element may be different than the order that these elements are
listed, noted or otherwise mentioned in these instructions. This includes situations
when a set of child target elements are specified in these instructions as items
in
a list following instructions regarding the parent target element; the order
of the
items dictates the order that the target elements should occur.
Elaboration regarding first exception: there are ordering constraints imposed
by the target schema for some elements, requiring that target child elements
must
occur in a certain order within target parent elements, and this order may differ
from the order of their corresponding source elements in the source documents.
In
this case, the constraints imposed by the target schema must be respected.
Elaboration regarding second exception: there will be occasional scenarios
when the source elements must not only be converted to particular target elements,
but must also be shifted to specifically different locations within in the target
documents. These scenarios will be explicitly mentioned for the source and target
elements affected and must override the general rule to maintain element order.
Processing Instructions
In the source content there may be processing instructions. For example
<?page.*?>. If a processing instruction is encountered it should be
suppressed and not converted into the output.
Identifiers such as xml:id and
ref:anchor/@id are ID data typed. Refer to the target
schema/documentation to determine whether or not the value is ID data typed.
ID data types cannot contain colons and may not begin with a number (among other
restrictions). To properly map to a node that is ID data typed, conversion
instructions state to substitute a colon or a space with an underscore. Also,
prefix
values beginning with a number, with an underscore. The xml schema will enforce
these constraints post conversion.
Do not convert the following cases:
Leading and trailing space(s) (e.g. id=" example_id_value_001 ")
XML Entities (e.g. id="example_id_value_001
")
Other identifiers, such as @anchoridref are not ID
data typed. However, they may link to those that are. For example, an
@anchoridref may point a
ref:anchor/@id. Since @anchoridref
is not ID data typed, the ID constraints will not be enforced by the schema post
conversion, and will result in broken links. So, to ensure proper link resolution,
it is imperative that such identifiers also follow the ID data type restrictions
(@anchoridref in this case).
Description
end topicref AU01_introduction.dita
start topichead Mapping to ID Data Type
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_identifier-LxAdv-ID_data_type-HandlingPatternRestrictions.dita
**************************************************************************************
NOTE:
The context node for this template MUST be a string value.
This template returns a string value that has been modified to
meet the restrictions of the xs:id datatype.
It was originally intended for xml:id, id, and ID attributes, but would
also work for anything else where the xs:id datatype is required.
This template does not handle ALL entities,as
Saxon will by default, *resolve* entities before this template
processes the string. XSLT cannot change this behavior. It will now identify and
replace pointy brackets and ampersands, however, with an underscore as resolving
those would definitely be a problem for the parser.
****************************************************************************************
<xsl:template name="normalizeIdString"><!-- first step: replace illegal characters with an underscore --><!-- WPK 2017-10-19. Added mdash to list of disallowed chars.
WPK 2017-10-24.
added (left double quote #x93;)
added (non printable control character #x80;)
added Â
added Ã
added ¢
added – (en dash –)
Background. These are likely encoding issues. This allows for valid IDs to be created because they are invalid characters nevertheless.
AU10 PS2017050503412620096LNIAULNPG_input_BUS_GUID_74731000.xml
in âÂÂ
out –
â becomes â
 becomes € (control character displays as blank)
 becomes “ (back slanted double quote)
http://www.i18nqa.com/debug/utf8-debug.html
(expected is not what LN expects but what the website indicates as expected in its context)
Unicode...Windows1252...Expected...Actual...UTF-8 Bytes
U+00A2 0xA2 ¢ ¢ %C2 %A2 (not tilde, but carrot - not exactly what is in data)
U+201C 0x93 “ “ %E2 %80 %9C
U+00E2 0xE2 â â %C3 %A2 (carrot as found in data)
AU10 PS2017050812233824638LNIAULNPG_input_BUS_GUID_93431000.xml
– (en dash –)
--><xsl:variable name="idWithoutDisallowedChars"><xsl:value-of select="translate(. , ',!#$%()*+/:;=?@![]\^`|{}~’‘—Ââ–', '__________________________________')"/></xsl:variable><!-- get rid of stubborn entities--><xsl:variable name="idWithoutDisallowedEnts"><xsl:analyze-string select="$idWithoutDisallowedChars" regex="<|>|&|'"><xsl:matching-substring><xsl:text>_</xsl:text></xsl:matching-substring><xsl:non-matching-substring><xsl:value-of select="."/></xsl:non-matching-substring></xsl:analyze-string></xsl:variable><!-- remove leading and trailing spaces and entities --><xsl:variable name="idWoLeadingSpaces"><xsl:value-of select="replace($idWithoutDisallowedEnts, '^\s+', '')"/></xsl:variable><xsl:variable name="idWoTrailingSpaces"><!-- this should also handle resolved whitespace and ampersand entities --><xsl:value-of select="replace($idWoLeadingSpaces, '\s+$', '')"/></xsl:variable><xsl:variable name="idWoInternalSpaces"><xsl:value-of select="replace($idWoTrailingSpaces, '\s+', '_')"/></xsl:variable><!-- prepend underscore with leading values of period, hyphen, or numeral --><xsl:choose><xsl:when test="matches($idWoInternalSpaces , '^[0-9]|^\.|^\-')"><xsl:value-of select="concat('_', $idWoInternalSpaces)"/></xsl:when><xsl:otherwise><xsl:value-of select="$idWoInternalSpaces"/></xsl:otherwise></xsl:choose></xsl:template>
Template
normalizeIdString_dropchars
Documentation
Description
named template normalizeIdString_dropchars receives the same input (string) as
normalizeIdString, but replaces all illegal characters and spaces with nothing. It still
prepends an underscore if the string begins with a number or illegal starting character.
The output should still be a valid id datatype and NMTOKEN. This is less commonly used
for IDs than the normalizeIdString template but may be useful for some other attributes
Namespace
No namespace
Import precedence
0
Source
<xsl:template name="normalizeIdString_dropchars"><!-- first step: replace illegal characters with an underscore --><xsl:variable name="idWithoutDisallowedChars"><xsl:value-of select="translate(. , ',!#$%()*+/:;=?@![]\^`|{}~’‘', '')"/></xsl:variable><!-- get rid of stubborn entities--><xsl:variable name="idWithoutDisallowedEnts"><xsl:analyze-string select="$idWithoutDisallowedChars" regex="<|>|&|'"><xsl:matching-substring/><xsl:non-matching-substring><xsl:value-of select="."/></xsl:non-matching-substring></xsl:analyze-string></xsl:variable><!-- remove leading and trailing spaces and entities --><xsl:variable name="idWoLeadingSpaces"><xsl:value-of select="replace($idWithoutDisallowedEnts, '^\s+', '')"/></xsl:variable><xsl:variable name="idWoTrailingSpaces"><!-- this should also handle resolved whitespace and ampersand entities --><xsl:value-of select="replace($idWoLeadingSpaces, '\s+$', '')"/></xsl:variable><xsl:variable name="idWoInternalSpaces"><xsl:value-of select="replace($idWoTrailingSpaces, '\s+', '')"/></xsl:variable><!-- prepend underscore with leading values of period, hyphen, or numeral --><xsl:choose><xsl:when test="matches($idWoInternalSpaces , '^[0-9]|^\.|^\-')"><xsl:value-of select="concat('_', $idWoInternalSpaces)"/></xsl:when><xsl:otherwise><xsl:value-of select="$idWoInternalSpaces"/></xsl:otherwise></xsl:choose></xsl:template>
Template
@id | @ID
Documentation
Description
Instructions
Identifier values in the source, such as @id, may not have
uniqueness constraints applied to them. As a result, duplicate identifier values
may exist. If such values are mapped to a target such as
@xml:id, schema validation errors will occur. The
@xml:id attribute is ID data typed, and therefore
does have the uniqueness constraint applied. In this case:
convert the first value in the duplicate sequence
drop the remaining values in the duplicate sequence
stolen from the web, and for reference: id datatypes must follow NCName restrictions
Practical restrictions of an NCName
The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, %, &, /, +, ,, ;,
whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character
although they can appear later in an NCName.
Allowed characters: -, ., 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, _,
a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
Also, - and . cannot be used as the first character of the value.
Disallowed characters: , !, ", #, $, %, &, ', (, ), *, +, ,, /, :, ;, <, =, >, ?, @, [, \, ], ^, `, {, |, }, ~
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_identifier-LxAdv-ID_data_type-HandlingDuplicates.dita
1. There are @id and @ID elements in dictionarydoc-norm.dtd.
In some cases these need to be transformed to xml:id and in other cases they need to be transformed to @id.
All of them need to be checked for duplicate values. We know these 4 cases:
The mapping of refpt/@id to ref:anchor/@id - IS DONE IN THIS AND modules/nonamespace/Rosetta_refpt-LxAdv-ref.anchor.xsl
The following mapping is NOT YET DONE as of 3/20/17 because these modules are not in scope for HK05:
The mapping of footnote/@fntoken to footnote/ref:anchor/@id
The mapping fnr/@fnrtoken to footnote-ref/ref:anchor/@id
The mapping of fnr/@fntoken to foonote-ref/@anchoridref
*****************************************************************************
This named template "amIaDuplicate" returns 'false' if the @id or @ID is
a unique */@ID or */@id in the document. It returns 'true' if the @id
or @ID is the 2nd or subsequent @id or @ID in the document with the same value.
The parent element name does not matter; whether the attribute name is @id
or @ID does not matter.
It must be used in conjunction with
<xsl:key name="idTypeValue" match="*[@id]" use="@id"/>
<xsl:key name="idTypeValue" match="*[@ID]" use="@ID"/>
(if your stream contains footnotes also include)
<xsl:key name="idTypeValue" match="footnote" use="@fntoken"/>
<xsl:key name="idTypeValue" match="fnr" use="@fnrtoken"/>
BOTH inserted at the TOP LEVEL of the stylesheet driver.
It needs to be called from the element containing the attribute as a context
node, not the attribute itself, or it won't work
For example:
<xsl:template match="refpt">
<xsl:call-template name="amIaDuplicate"/>
</xsl:template>
will return true if this is a refpt with unique @id or is the first of
more than one element in the document having the same @id or @ID value.
How the context template handles this boolean value is left as an exercise
for the developer of that template.
If the test for unique values is element-specific or attribute-specific
within the document, a copy of/variation on this code with a more specific key is
recommended rather than reusing this generic template.
- JL
********************************************************************************
<xsl:template name="amIaDuplicate"><xsl:choose><xsl:when test="not(key('idTypeValue', @id | @ID | @fntoken[parent::footnote] | @fnrtoken[parent::fnr])[2])"><!-- id value is unique to document --><xsl:text>false</xsl:text></xsl:when><xsl:otherwise><xsl:variable name="contextNodeGenID" select="generate-id(.)"/><xsl:choose><xsl:when test="key('idTypeValue', @id | @ID | @fntoken[parent::footnote] | @fnrtoken[parent::fnr])[local-name(.)!=('refpt', 'footnote' , 'fnr')] and key('idTypeValue', @id | @ID)[local-name(.)=('refpt' , 'footnote', 'fnr')]"><!--*** key has mixed refpt, footnote, fnr / and other values ***--><!-- non-refpt/footenote/fnr values are all dupes by definition --><!-- TO DO only the first refpt/footnote/fnr key is false --><!-- so IF I am the first refpt/footnote/fnr, I am the only nondupe --><xsl:for-each select="key('idTypeValue', @id | @ID | @fntoken[parent::footnote] | @fnrtoken[parent::fnr])[local-name(.)=('refpt' , 'footnote', 'fnr')][1]"><xsl:choose><xsl:when test="generate-id(.)=$contextNodeGenID">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:for-each></xsl:when><xsl:otherwise><!-- everything with matching id is a refpt/footnote/fnr or everything with matching id is not a
refpt/footnote/fnr so everything but the first id is a dup --><xsl:for-each select="key('idTypeValue', @id | @ID | @fntoken[parent::footnote] | @fnrtoken[parent::fnr])[1]"><xsl:choose><xsl:when test="generate-id(.)=$contextNodeGenID">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:for-each></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:template>
Template
case:headnote
Documentation
Description
<case:headnote>
...
<glp:note>
<p>
<text>[<emph typestyle="bf">Note. </emph> As to the distinction between exemplary and aggravated damages, see <emph typestyle="it">Luntz on Assessment of Damages </emph> (2nd ed) para 1.7.01 <emph typestyle="it">et seq </emph> and 12 <emph typestyle="it">Halsbury's Laws of England </emph> (4th ed) para 1189.] </text>
</p>
</glp:note>
</case:headnote>
becomes
<courtcase:head>
...
<note>
<bodytext>
<p>
<text>[<emph typestyle="bf">Note. </emph> As to the distinction between exemplary and aggravated damages, see <emph typestyle="it">Luntz on Assessment of Damages </emph> (2nd ed) para 1.7.01 <emph typestyle="it">et seq </emph> and 12 <emph typestyle="it">Halsbury's Laws of England </emph> (4th ed) para 1189.] </text>
</p>
</bodytext>
</note>
</courtcase:head>
Note: If heading occurs as a direct child of case:headnote, then conversion
should create heading as direct child of caseinfo:caseinfo, i.e.
case:headnote/heading becomes
courtcase:head/caseinfo:caseinfo/heading.
case:headnote/footnotegrp and case:headnote/page
If footnotegrp occurs as a direct child of case:headnote
then the conversion should append this element as children of nearest element containing
bodytext.
If page occurs as a direct child of case:headnote
then the conversion should append this element as children of nearest element.
The resulting conversion should maintain a physical order with the existing document
content.
Source: case:headnote/footnotegrp and case:headnote/page
<case:body>
<case:headnote>
<case:length>20 Pages</case:length>
<case:info>...</case:info>
<catchwordgrp>
<catchwords>...</catchwords>
</catchwordgrp>
<case:factsummary>
...
<p>
<text>Section 135.4(9) provided that for a person to be guilty of such an offence, <nl/>that
person must have entered into an agreement with one or more other persons, <nl/>the person and
at least one other party to the agreement must have intended to do <nl/>the thing pursuant to
the agreement, and those persons must have committed an <nl/>overt act pursuant to the
agreement.</text>
</p>
<p>
<text>By s 4.1(1) of the Code, a physical element of an offence could be conduct,
<nl/>and, under s 4.1(2), “conduct” was defined to mean “an act,
an omission to <nl/>perform an act or a state of affairs”.</text>
</p>
</case:factsummary>
<footnotegrp>
<footnote fntoken="2011-80-NSWLR-486.fn_a" fnrtokens="2011-80-NSWLR-486.fnr_a">
<fnlabel>*</fnlabel>
<fnbody>
<p>
<text>[EDITORIAL NOTE: An application for special leave to appeal to the High Court was
refused.]</text>
</p>
</fnbody>
</footnote>
</footnotegrp>
<page count="487" reporter="NSWLR" text="(2011) 80 NSWLR 486 at " subdoc="true"/>
<case:decisionsummary>
<p>
<text>...
Target: courtcase:head/casesum:summaries with footnotegroup and ref:page
<courtcase:head>
<caseinfo:caseinfo>...</caseinfo:caseinfo>
<casesum:summaries>
<casesum:editorialsummary>
...
<p>
<text>
Section 135.4(9) provided that for a person to be guilty of such an offence,
<proc:nl />
that person must have entered into an agreement with one or more other persons,
<proc:nl />
the person and at least one other party to the agreement must have intended to do
<proc:nl />
the thing pursuant to the agreement, and those persons must have committed an
<proc:nl />
overt act pursuant to the agreement.
</text>
</p>
<p>
<text>
By s?4.1(1) of the Code, a physical element of an offence could be conduct,
<proc:nl />
and, under s?4.1(2), “conduct” was defined to mean “an act, an omission to
<proc:nl />
perform an act or a state of affairs”.
</text>
</p>
<p>
<text>
<footnotegroup>
<footnote>
<ref:anchor id="_2011-80-NSWLR-486.fn_a" />
<ref:returnreference>
<ref:locator anchoridref="_2011-80-NSWLR-486.fnr_a" anchortype="local" />
</ref:returnreference>
<label>*</label>
<bodytext>
<p>
<text>[EDITORIAL NOTE: An application for special leave to appeal to the High Court was refused.]</text>
</p>
</bodytext>
</footnote>
</footnotegroup>
</text>
</p>
<ref:page includeintoc="true" num="487" page-scheme="500067" page-scheme-type="reporter-series-code" />
</casesum:editorialsummary>
<casesum:decisionsummary>
<bodytext>
<p>...
When heading occurs as direct child of
case:body conversion should create heading
as direct child of caseinfo:caseinfo, i.e.
case:body/heading becomes
caseinfo:caseinfo/heading.
When h occurs as direct child of case:info
conversion should create heading as direct child of
caseinfo:caseinfo, i.e. case:info/h becomes
caseinfo:caseinfo/heading.
<case:info>
...
<h>Application for registration of trade mark <emph typestyle="smcaps"><emph typestyle="ro">cedarapids</emph></emph></h>
...
</case:info>
becomes
<caseinfo:caseinfo>
...
<heading>
<title>Application for registration of trade mark <emph typestyle="smcaps"><emph typestyle="ro">cedarapids</emph></emph></title>
</heading>
...
</caseinfo:caseinfo>
Any nl elements that occur inside
case:casename should be suppressed if they are preceded or followed
by a space. Any nl elements that are not preceded or followed by a
space should be converted into a single space character.
Any occurrences of the attribute @ln.user-displayed in
case:casename should be suppressed.
<case:casename>Entre<nl/> Irving Oil Limited, Demanderesse, et<nl/> Sa Majesté la Reine, Défenderesse</case:casename>
becomes
<caseinfo:casename>
<caseinfo:fullcasename>Entre Irving Oil Limited, Demanderesse, et Sa Majesté la Reine, Défenderesse</caseinfo:fullcasename>
</caseinfo:casename>
Example: AU content
<case:casename>Re: GOLDEN BREAD PTY. LTD.; THE QUEENSLAND <nl/>CO-OPERATIVE MILLING ASSOCIATION v HUTCHISON</case:casename>
becomes
<caseinfo:casename>
<caseinfo:fullcasename>Re: GOLDEN BREAD PTY. LTD.; THE QUEENSLAND CO-OPERATIVE MILLING ASSOCIATION v HUTCHISON</caseinfo:fullcasename>
</caseinfo:casename>
Example: NZ content
<case:casename>Smith (Appellant) v Mackenzie (Respondent)</case:casename>
becomes
<caseinfo:casename>
<caseinfo:fullcasename>Smith (Appellant) v Mackenzie (Respondent)</caseinfo:fullcasename>
</caseinfo:casename>
Example: UK content
<case:casename>Crozier v Wishart & Company Limited and Western Printing Services Ltd</case:casename>
becomes
<caseinfo:casename>
<caseinfo:fullcasename>Crozier v Wishart & Company Limited and Western Printing Services Ltd</caseinfo:fullcasename>
</caseinfo:casename>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_caselaw\Rosetta_case.casename-LxAdv_caseinfo.casename_caseinfo.fullcasename.dita
JD: added $streamID test for VSTS Bug 379082: all casenames should be combined under a single wrapper.
MDS 2017-07-27 - Added following-sibling::fnr[1] to address input in AU13
Awantika:2017-10-31- Added the [not(preceding-sibling::*[1][self::case:casename][$streamID='AU01'])] condition to resolve the ambiguity between two case:casename on line 99 and 116
Note: Conversion should not create consecutive caseinfo:caseinfo
elements. When 2 or more consecutive sibling source elements map to
caseinfo:caseinfo, data should be merged to a single
caseinfo:caseinfo element unless this would hamper content
ordering.
Example: AU content
<case:info>
<case:casename>ELECON AUSTRALIA PTY LTD v BREVINI AUSTRALIA PTY LTD (NSD 1423 of
2004)</case:casename>
<case:altname>PIV DRIVES GMBH and Another v ELECON AUSTRALIA PTY LTD and Others (NSD 1955 of
2004)</case:altname>
</case:info>
becomes
<caseinfo:caseinfo>
<caseinfo:casename>
<caseinfo:fullcasename>ELECON AUSTRALIA PTY LTD v BREVINI AUSTRALIA PTY LTD (NSD 1423 of
2004)</caseinfo:fullcasename>
</caseinfo:casename>
<caseinfo:alternatecasename>PIV DRIVES GMBH and Another v ELECON AUSTRALIA PTY LTD and Others
(NSD 1955 of 2004)</caseinfo:alternatecasename>
</caseinfo:caseinfo>
Example: NZ content
<case:info>
<case:casename>HITCHENS v DOUBLE ZERO HOLDINGS LTD</case:casename>
<case:altname>RABSON v DOUBLE ZERO HOLDINGS LTD</case:altname>
</case:info>
becomes
<caseinfo:caseinfo>
<caseinfo:casename>
<caseinfo:fullcasename>HITCHENS v DOUBLE ZERO HOLDINGS LTD</caseinfo:fullcasename>
</caseinfo:casename>
<caseinfo:alternatecasename>RABSON v DOUBLE ZERO HOLDINGS LTD</caseinfo:alternatecasename>
</caseinfo:caseinfo>
For AU13 Content - case:altname becomes
compcase:caseinfo/caseinfo:alternatecasename.
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.courtinfo_abbrvname-LxAdv_caseinfo.shortcasename.dita
Namespace
No namespace
Match
abbrvname
Mode
#default
Import precedence
0
Source
<xsl:template match="abbrvname"><!-- Original Target XPath: caseinfo:casename/caseinfo:shortcasename --><caseinfo:shortcasename><xsl:apply-templates select="@* | node()"/></caseinfo:shortcasename></xsl:template>
case:reportercite becomes ref:citations with child elements as described below:
Create caseinfo:caseinfo/ref:citations/ref:cite4thisresource with attribute @citetype defines the type of citation "reporter".
Note: For handling of citation markup; kindly
refer to the instructions for ci:cite in the General Markup section.
Note: Conversion should not create consecutive caseinfo:caseinfo elements. When 2 or more consecutive sibling
source elements map to caseinfo:caseinfo, data should be merged to a single
caseinfo:caseinfo element unless this would hamper content ordering.
If case:reportercite/@searchtype has a value of "BCNUM", this indicates that the case is unreported and additional
markup should be added to courtcase:head:
Create courtcase:statusnotice.
Create courtcase:pubstatus with the attribute @status set to "none".
Create p/text and populate text with "unreported case" (don't include
quotes).
Note: Conversion should not create consecutive caseinfo:caseinfo elements. When 2 or more
consecutive sibling source elements map to caseinfo:caseinfo, data should be merged to
a single caseinfo:caseinfo element unless this would hamper content ordering.
<xsl:template match="case:courtinfo"><!-- Original Target XPath: /caseinfo:caseinfo/jurisinfo:courtinfo --><xsl:choose><xsl:when test="parent::case:judgment"><xsl:apply-templates/></xsl:when><xsl:otherwise><jurisinfo:courtinfo><xsl:apply-templates select="case:courtcode"/><xsl:apply-templates select="case:courtname"/><xsl:apply-templates select="case:juris"/></jurisinfo:courtinfo><!-- Awantika: 2017-10-17: Added case:dates and case:judges in except condition for HK03 --><!-- Awantika: 2017-10-27- removing page if coming under case:courtinfo and placing it inside courtcase:panel --><!--SS[2017-11-21]: Added this condition "./text()[preceding-sibling::case:courtcode and following-sibling::case:judges][$streamID='AU01']" for moving text() of case:courtinfo under target 'courtcase:judges' element --><!--SS[2017-01-12]: Added this condition "./text()[preceding-sibling::case:courtcode and following-sibling::case:courtloc][$streamID='NZ03']" for moving text() of case:courtinfo under target 'location:city' element --><!--RS[2018-01-04]: Modify the condition "./text()[preceding-sibling::case:courtcode or preceding-sibling::case:courtname and following-sibling::case:judges][$streamID='AU01']" for moving text() of case:courtinfo under target 'courtcase:judges' element --><xsl:apply-templates select="@* | node() except (case:courtcode | case:courtname | case:juris | ./text()[following-sibling::case:courtloc][$streamID=('AU09','AU01')] | ./text()[preceding-sibling::case:courtcode or preceding-sibling::case:courtname and following-sibling::case:judges][$streamID='AU01'] | ./text()[preceding-sibling::case:courtcode and following-sibling::case:courtloc][$streamID='NZ03'] | case:courtloc[$streamID=('AU09','AU01', 'NZ03')] | case:judges[$streamID=('HK03')] | case:dates[$streamID=('HK03')] | page[$streamID='HK03'] | ./text()[preceding-sibling::case:filenum and following-sibling::filenum][$streamID='NZ03'] | ./text()[preceding-sibling::case:dates and following-sibling::case:dates][$streamID='NZ03'])"/><!--<xsl:apply-templates select="case:filenum"/>
<xsl:apply-templates select="case:judges[ancestor::case:headnote]"/>
<xsl:apply-templates select="case:dates"/>--><!--<xsl:apply-templates select="case:judges[ancestor::case:headnote]"/>
<xsl:apply-templates select="case:dates"/>--><!--<xsl:apply-templates select="@* | node()"/>--></xsl:otherwise></xsl:choose></xsl:template>
Template
case:courtname
Documentation
Description
case:courtname becomes
jurisinfo:courtname.
Note: Any nl elements that occur inside
case:courtname should be suppressed if they are preceded or
followed by a space. Any nl elements that are not preceded or
followed by a space should be converted into a single space character.
Note: Exception scenario for CA01-Cases: nl becomes
proc:nl that occur inside
case:courtname.
Example: CA Content
<case:courtinfo>
...
<abbrvname ln.user-displayed="false">NTSC</abbrvname>
<case:courtname>Supreme Court of The Northwest Territories<nl/> Yellowknife, Northwest Territories</case:courtname>
...
</case:courtinfo>
becomes
<jurisinfo:courtinfo>
...
<jurisinfo:courtname normscheme="calongabbr">Supreme Court of The Northwest Territories<proc:nl/>
Yellowknife, Northwest Territories</jurisinfo:courtname>
...
</jurisinfo:courtinfo>
Example: NZ Content
<case:courtinfo>
<case:courtname>Court of Appeal</case:courtname>
</case:courtinfo>
becomes
<jurisinfo:courtinfo>
<jurisinfo:courtname>Court of Appeal</jurisinfo:courtname>
</jurisinfo:courtinfo>
<xsl:template match="case:courtname"><jurisinfo:courtname><!-- JD: 2017-06-15: In UK01 this is shown in example code in CI but not mentioned elsewhere and not present in DT output.
Adding exclusion test for UK01, but I suspect rather than include this will need to be specifically included for certain streams.
--><xsl:if test="not($streamID='UK01' or $streamID='MY01')"><xsl:attribute name="normscheme"><xsl:text>calongabbr</xsl:text></xsl:attribute></xsl:if><xsl:apply-templates select="preceding-sibling::abbrvname"/><xsl:apply-templates select="@* | node()"/></jurisinfo:courtname></xsl:template>
doc:metadata/doc:docinfo/doc:legacy-metadata[metadatasource="lbu-meta"]/meta/metaitem.
The attributes of metaitem are populated as follows:
metaitem/@name should be set to "case:courtcode".
metaitem/@value should be set to the value of
case:courtcode.
For Canada Specific only
case:courtcode becomes
doc:metadata/doc:docinfo/doc:legacy-metadata[metadatasource="lbu-meta"]/meta/metaitem.
The attributes of metaitem are populated as follows:
metaitem/@name should be set to "case:courtcode".
metaitem/@value should be set to the value of
case:courtcode.
<xsl:template match="case:courtcode[not($streamID = ('NZ03', 'AU09'))]"><!-- Original Target XPath: jurisinfo:courtinfo/jurisinfo:alternatecourtcode/@alternatecourtcode --><!-- Awantika: 2017-10-30- Updated for AU01 where colon (:) was coming between case:courtcode and case:judges which was coming inside caseinfo:caseinfo
which caused validation error--><jurisinfo:alternatecourtcode><xsl:attribute name="alternatecourtcode"><xsl:choose><xsl:when test="$streamID = 'CA01'"><xsl:value-of select="following-sibling::abbrvname"/></xsl:when><xsl:otherwise><xsl:apply-templates select="@* | node()"/><xsl:if test="normalize-space(following-sibling::text()[1]) = ':' and $streamID='AU01'"><xsl:value-of select="following-sibling::text()[1]"/></xsl:if></xsl:otherwise></xsl:choose></xsl:attribute></jurisinfo:alternatecourtcode></xsl:template>
Awantika: 2017-10-30- Updated for AU01 where colon (:) was coming between case:courtcode and case:judges which was coming inside caseinfo:caseinfo
which caused validation error
Note: Conversion should not create consecutive caseinfo:caseinfo
elements. When 2 or more consecutive sibling source elements map to
caseinfo:caseinfo, data should be merged to a single
caseinfo:caseinfo element unless this would hamper content
ordering.
Note: This likely not a complete date, rather just a day. Do not
attempt to place a complete date if there is not sufficient content in source (year,
month and day). It should remain PCDATA. See example.
case:decisiondate becomes
/courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates/decision:decisiondate
populated with below mentioned attributes:
case:decisiondate/date/@day becomes decision:decisiondate/@day,
case:decisiondate/date/@month becomes decision:decisiondate/@month and
case:decisiondate/date/@year becomes decision:decisiondate/@year
The attribute decision:decisiondate/@normdate should be
populated with the values of case:decisiondate/date/@year,
case:decisiondate/date/@month and
case:decisiondate/date/@day concatenated and separated by a
single hyphen. The values of case:decisiondate/date/@month
and case:decisiondate/date/@day should be padded with zeroes
so that they are 2 digits.
Note: If one or more of the three date values (year,
month or day) are absent, then
decision:decisiondate/@normdate should not be
populated.
date becomes /courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates/decision:decisiondate/date-text
Example where complete date occurs within case:hearingdate:
<case:hearingdates>
<date day="12" month="05" year="2000">12 May 2000</date>
</case:hearingdates>
Becomes
<decision:argueddate day="12" month="05" year="2000">
<date-text>12 May 2000</date-text>
</decision:argueddate>
Note: when @ln.user-displayed="false“
appears on a date element (i.e,
case:decisiondate/@ln.user-displayed="false"), that element
is translated into the target but with the element content omitted. Only the
attributes are populated. So there is no display content.
<case:dates>
...
<case:publishdate>; Date of publication of reasons: 7 July 2009</case:publishdate>
</case:dates>
Becomes
<decision:dates>
...
<decision:releaseddate>; Date of publication of reasons: 7 July 2009</decision:releaseddate>
</decision:dates>
case:reviseddate becomes
/courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates/decision:revisiondate
populated with below mentioned attributes:
case:reviseddate/date/@day becomes
decision:revisiondate/@day,
case:reviseddate/date/@month becomes
decision:revisiondate/@month and
case:reviseddate/date/@year becomes
decision:revisiondate/@year
date becomes
/courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates/decision:revisiondate/date-text
Note: The formatting of the date-text should not be normalized to
YYYY-MM-DD. The attributes are used for normalization, but the element content should
remain the same but whitespace and comma should retain outside the date-text element.
Description
Awantika: Completed- already done some templates
<topicref href="AU01_Rosetta_case.dates.dita"/>
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.dates.dita
Namespace
No namespace
Match
case:dates
Mode
#default
Import precedence
0
Source
<xsl:template match="case:dates"><!-- Original Target XPath: /courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates --><!-- NOTE: it is assumed that this template will be called from whatever generates required parent wrapper elements --><xsl:choose><xsl:when test="parent::case:judgments"><xsl:apply-templates select="case:decisiondate"/></xsl:when><xsl:otherwise><decision:dates><xsl:apply-templates select="@* | node()"/></decision:dates></xsl:otherwise></xsl:choose></xsl:template>
Template
case:hearingdates
Namespace
No namespace
Match
case:hearingdates
Mode
#default
Import precedence
0
Source
<xsl:template match="case:hearingdates"><!-- Original Target XPath: /courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates/decision:argueddate --><decision:argueddate><xsl:if test="./date/@year"><xsl:attribute name="year" select="./date/@year"/></xsl:if><xsl:if test="./date/@month"><xsl:attribute name="month" select="./date/@month"/></xsl:if><xsl:if test="./date/@day"><xsl:attribute name="day" select="./date/@day"/></xsl:if><xsl:if test="./date/@day and ./date/@month and ./date/@year"><xsl:attribute name="normdate" select="concat(./date/@year,'-',./date/@month,'-',./date/@day)"/></xsl:if><xsl:if test="@ln.user-displayed !='false' or not(@ln.user-displayed)"><xsl:apply-templates select="@* | node()"/></xsl:if></decision:argueddate></xsl:template>
Template
case:decisiondate
Namespace
No namespace
Match
case:decisiondate
Mode
#default
Import precedence
0
Source
<xsl:template match="case:decisiondate"><decision:decisiondate><xsl:if test="./date/@year"><xsl:attribute name="year" select="./date/@year"/></xsl:if><xsl:if test="./date/@month"><xsl:attribute name="month" select="./date/@month"/></xsl:if><xsl:if test="./date/@day"><xsl:attribute name="day" select="./date/@day"/></xsl:if><xsl:if test="./date/@day and ./date/@month and ./date/@year"><xsl:attribute name="normdate" select="concat(./date/@year,'-',./date/@month,'-',./date/@day)"/></xsl:if><xsl:if test="@ln.user-displayed !='false' or not(@ln.user-displayed)"><xsl:apply-templates select="@* | node()"/></xsl:if></decision:decisiondate></xsl:template>
Template
case:publishdate
Documentation
Description
NOTE: probably belongs in a nonamespace module
NOTE: source <date> attributes must be moved to target parent of <date-text> (see templates in this file)
<xsl:template match="case:publishdate"><!-- Original Target XPath: decision:releaseddate --><decision:releaseddate><xsl:if test="./date/@year"><xsl:attribute name="year" select="./date/@year"/></xsl:if><xsl:if test="./date/@month"><xsl:attribute name="month" select="./date/@month"/></xsl:if><xsl:if test="./date/@day"><xsl:attribute name="day" select="./date/@day"/></xsl:if><xsl:if test="./date/@day and ./date/@month and ./date/@year"><xsl:attribute name="normdate" select="concat(./date/@year,'-',./date/@month,'-',./date/@day)"/></xsl:if><xsl:if test="@ln.user-displayed !='false' or not(@ln.user-displayed)"><xsl:apply-templates select="@* | node()"/></xsl:if></decision:releaseddate></xsl:template>
Template
case:reviseddate
Namespace
No namespace
Match
case:reviseddate
Mode
#default
Import precedence
0
Source
<xsl:template match="case:reviseddate"><!-- Original Target XPath: /courtcase:courtcase/courtcase:head/caseinfo:caseinfo/decision:dates/decision:revisiondate --><decision:revisiondate><xsl:if test="./date/@year"><xsl:attribute name="year" select="./date/@year"/></xsl:if><xsl:if test="./date/@month"><xsl:attribute name="month" select="./date/@month"/></xsl:if><xsl:if test="./date/@day"><xsl:attribute name="day" select="./date/@day"/></xsl:if><xsl:if test="./date/@day and ./date/@month and ./date/@year"><xsl:attribute name="normdate" select="concat(./date/@year,'-',./date/@month,'-',./date/@day)"/></xsl:if><xsl:if test="@ln.user-displayed !='false' or not(@ln.user-displayed)"><xsl:apply-templates select="@* | node()"/></xsl:if></decision:revisiondate></xsl:template>
Template
case:courtloc
Documentation
Description
Note: Conversion should not create consecutive caseinfo:caseinfo
elements. When 2 or more consecutive sibling source elements map to
caseinfo:caseinfo, data should be merged to a single
caseinfo:caseinfo element unless this would hamper content
ordering.
<case:courtinfo>
<case:courtname>FEDERAL COURT OF AUSTRALIA</case:courtname>
<case:courtcode>FCA</case:courtcode> - will be moved under doc:legacy-metadata.
<case:courtloc>Sydney</case:courtloc>
</case:courtinfo>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.courtloc-LxAdv_jurisinfo.jurisdiction_jurisinfo.location.dita
Namespace
No namespace
Match
case:courtloc
Mode
#default
Import precedence
0
Source
<xsl:template match="case:courtloc"><jurisinfo:location><!-- Awantika: CI doesn't have any instruction for how to mark the content in city or state or country. DT is outputting city always following the same --><location:city><xsl:apply-templates select="@* | node()"/></location:city></jurisinfo:location></xsl:template>
Template
case:juris[starts-with(upper-case(.),'NSW') or starts-with(upper-case(.),'QLD') or
starts-with(upper-case(.),'SA') or starts-with(upper-case(.),'TAS') or starts-with(upper-case(.),'VIC')
or starts-with(upper-case(.),'WA') or starts-with(upper-case(.),'ACT') or starts-with(upper-case(.),'NT')
or starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth') or starts-with(lower-case(.),'fj')
or starts-with(lower-case(.),'uk') or starts-with(lower-case(.),'nz') or starts-with(lower-case(.),'can')
or starts-with(lower-case(.),'sg')or starts-with(lower-case(.),'us')]
Documentation
Description
case:juris can have State/Territory code or Country code.
When case:juris has State/Territory code:
case:juris becomes
jurisinfo:courtinfo/jurisinfo:jurisdiction/jurisinfo:system
and create dc:metadata/dc:coverage/location:state with
attributes @codescheme="ISO-3166-2" and @statecode, value for this attribute will
be
picked from the below mentioned pick list:
AU-NS : New South Wales (NSW)
AU-QL : Queensland (QLD)
AU-SA : South Australia (SA)
AU-TS : Tasmania (TAS)
AU-VI : Victoria (VIC)
AU-WA : Western Australia (WA)
AU-CT : Australian Capital Territory (ACT)
AU-NT : Northern Territory (NT)
and the value for
jurisinfo:courtinfo/jurisinfo:alternatecourtcode/@alternatecourtcode
will be picked up from
case:courtcode.
Note: If value for
case:juris is "CTH" then case:juris
will become
jurisinfo:courtinfo/jurisinfo:jurisdiction/jurisinfo:system
and create dc:metadata/dc:coverage/location:country with
attributes @codescheme="ISO-3166-1" and @countrycode="AU".
Note: The ordering of the jurisinfo:alternatecourtcode and
jurisinfo:jurisdiction\jurisinfo:system is not significant
in terms of display.
Description
Awantika: Completed
<topicref href="AU01_Rosetta_case.juris.dita"/>
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.juris.dita
Awantika: 2017-11-01- Added fj value as AU-FJ source has fj value in case:juris
Awantika: 2017-11-07- Added markup for uk,can,nz in case:juris. Webstar # 7041469
Ankita : 20-12-2017- Added markup for "us" in case:juris . Webtar# 7071460
Namespace
No namespace
Match
case:juris[starts-with(upper-case(.),'NSW') or starts-with(upper-case(.),'QLD') or
starts-with(upper-case(.),'SA') or starts-with(upper-case(.),'TAS') or starts-with(upper-case(.),'VIC')
or starts-with(upper-case(.),'WA') or starts-with(upper-case(.),'ACT') or starts-with(upper-case(.),'NT')
or starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth') or starts-with(lower-case(.),'fj')
or starts-with(lower-case(.),'uk') or starts-with(lower-case(.),'nz') or starts-with(lower-case(.),'can')
or starts-with(lower-case(.),'sg')or starts-with(lower-case(.),'us')]
Mode
#default
Import precedence
0
Source
<xsl:template match="case:juris[starts-with(upper-case(.),'NSW') or starts-with(upper-case(.),'QLD') or starts-with(upper-case(.),'SA') or starts-with(upper-case(.),'TAS') or starts-with(upper-case(.),'VIC') or starts-with(upper-case(.),'WA') or starts-with(upper-case(.),'ACT') or starts-with(upper-case(.),'NT') or starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth') or starts-with(lower-case(.),'fj') or starts-with(lower-case(.),'uk') or starts-with(lower-case(.),'nz') or starts-with(lower-case(.),'can') or starts-with(lower-case(.),'sg')or starts-with(lower-case(.),'us')]"><!-- TODO: check that jurisinfo:courtinfo is created from case:courtinfo --><!--<jurisinfo:courtinfo--><!-- <xsl:apply-templates select="preceding-sibling::case:courtcode[1]"/>--><jurisinfo:jurisdiction><jurisinfo:system><xsl:apply-templates select="@* | node()"/></jurisinfo:system><xsl:apply-templates select="case:courtloc"/><!--<xsl:apply-templates select="preceding-sibling::case:courtloc[$streamID='AU01']"/>--></jurisinfo:jurisdiction><!--</jurisinfo:courtinfo>--></xsl:template>
Template
case:juris[starts-with(upper-case(.),'NSW') or starts-with(upper-case(.),'QLD') or
starts-with(upper-case(.),'SA') or starts-with(upper-case(.),'TAS') or starts-with(upper-case(.),'VIC')
or starts-with(upper-case(.),'WA') or starts-with(upper-case(.),'ACT') or starts-with(upper-case(.),'NT')
or starts-with(lower-case(.),'fj')]metadata
Documentation
Description
Awantika: common module of case:courtcode is already created
case:juris[starts-with(upper-case(.),'NSW') or starts-with(upper-case(.),'QLD') or
starts-with(upper-case(.),'SA') or starts-with(upper-case(.),'TAS') or starts-with(upper-case(.),'VIC')
or starts-with(upper-case(.),'WA') or starts-with(upper-case(.),'ACT') or starts-with(upper-case(.),'NT')
or starts-with(lower-case(.),'fj')]
Mode
metadata
Import precedence
0
Source
<xsl:template match="case:juris[starts-with(upper-case(.),'NSW') or starts-with(upper-case(.),'QLD') or starts-with(upper-case(.),'SA') or starts-with(upper-case(.),'TAS') or starts-with(upper-case(.),'VIC') or starts-with(upper-case(.),'WA') or starts-with(upper-case(.),'ACT') or starts-with(upper-case(.),'NT') or starts-with(lower-case(.),'fj')]" mode="metadata"><dc:coverage><location:state codescheme="ISO-3166-2"><xsl:attribute name="statecode"><xsl:choose><xsl:when test="starts-with(upper-case(.),'NSW')"><xsl:value-of select="'AU-NS'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'QLD')"><xsl:value-of select="'AU-QL'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'SA')"><xsl:value-of select="'AU-SA'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'TAS')"><xsl:value-of select="'AU-TS'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'VIC')"><xsl:value-of select="'AU-VI'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'WA')"><xsl:value-of select="'AU-WA'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'ACT')"><xsl:value-of select="'AU-CT'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'NT')"><xsl:value-of select="'AU-NT'"/></xsl:when><xsl:when test="starts-with(upper-case(.),'FJ')"><xsl:value-of select="'AU-FJ'"/></xsl:when><!--<xsl:when test="starts-with(upper-case(.),'SG')"><xsl:value-of select="'AU-SG'"/></xsl:when>--></xsl:choose></xsl:attribute><!--<xsl:apply-templates />--></location:state></dc:coverage></xsl:template>
Template
case:juris[starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth')or
starts-with(lower-case(.),'uk') or starts-with(lower-case(.),'nz') or starts-with(lower-case(.),'can')
or starts-with(lower-case(.),'sg')or starts-with(lower-case(.),'us')]metadata
case:juris[starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth')or
starts-with(lower-case(.),'uk') or starts-with(lower-case(.),'nz') or starts-with(lower-case(.),'can')
or starts-with(lower-case(.),'sg')or starts-with(lower-case(.),'us')]
Mode
metadata
Import precedence
0
Priority
20
Source
<xsl:template match="case:juris[starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth')or starts-with(lower-case(.),'uk') or starts-with(lower-case(.),'nz') or starts-with(lower-case(.),'can') or starts-with(lower-case(.),'sg')or starts-with(lower-case(.),'us')]" mode="metadata" priority="20"><dc:coverage><xsl:choose><xsl:when test="starts-with(upper-case(.),'CTH') or starts-with(lower-case(.),'cth')"><location:country codescheme="ISO-3166-1"><xsl:attribute name="countrycode"><xsl:value-of select="'AU'"/></xsl:attribute></location:country></xsl:when><xsl:when test="starts-with(lower-case(.),'uk')"><location:country codescheme="ISO-3166-2"><xsl:attribute name="countrycode"><xsl:value-of select="'UK'"/></xsl:attribute></location:country></xsl:when><xsl:when test="starts-with(lower-case(.),'can')"><location:country codescheme="ISO-3166-1"><xsl:attribute name="countrycode"><xsl:value-of select="'CA'"/></xsl:attribute></location:country></xsl:when><xsl:when test="starts-with(lower-case(.),'sg')"><location:country codescheme="ISO-3166-1"><xsl:attribute name="countrycode"><xsl:value-of select="'SG'"/></xsl:attribute></location:country></xsl:when><xsl:when test="starts-with(lower-case(.),'us')"><location:country codescheme="ISO-3166-1"><xsl:attribute name="countrycode"><xsl:value-of select="'US'"/></xsl:attribute></location:country></xsl:when><xsl:when test="starts-with(lower-case(.),'nz')"><location:country codescheme="ISO-3166-1"><xsl:attribute name="countrycode"><xsl:value-of select="'NZ'"/></xsl:attribute></location:country></xsl:when></xsl:choose></dc:coverage><!--</jurisinfo:courtinfo>--></xsl:template>
Template
case:courtcite
Documentation
Description
case:courtcite conversion depends upon its child elements,
refer below scenarios:
When ci:cite/@type="parallel" is a child of
case:courtcite then its become
ref:parallelcite/@citetype="court".
<case:courtcite>
<ci:cite type="parallel">
<ci:content>THE STATE OF WESTERN AUSTRALIA -v- A F [2014] WADC 124</ci:content>
</ci:cite>
</case:courtcite>
becomes
<ref:parallelcite citetype="court">
<lnci:cite>
<lnci:content>THE STATE OF WESTERN AUSTRALIA -v- A F [2014] WADC 124</lnci:content>
</lnci:cite>
</ref:parallelcite>
When ci:cite/@type="cite4thisdoc" is a child of
case:courtcite then its become
ref:cite4thisresource/@citetype="court".
<case:courtcite>
<ci:cite type="cite4thisdoc">
<ci:content>Maritime Union of Australia v Geraldton Port Authority [2000] FCA
16</ci:content>
</ci:cite>
</case:courtcite>
becomes
<ref:cite4thisresource citetype="court">
<lnci:cite>
<lnci:content>Maritime Union of Australia v Geraldton Port Authority [2000] FCA
16</lnci:content>
</lnci:cite>
</ref:cite4thisresource>
When @type attribute is not present in the
ci:cite element then
case:courtcite becomes
ref:cite4thisresource/@citetype="court"
<case:courtcite>
<ci:cite>
<ci:content>Le Brun (An Incapable Person Suing By His Next Friend Elaine Le Brun) v Joseph
and Ors [2006] WADC 200</ci:content>
</ci:cite>
</case:courtcite>
becomes
<ref:cite4thisresource citetype="court">
<lnci:cite>
<lnci:content>Le Brun (An Incapable Person Suing By His Next Friend Elaine Le Brun) v Joseph
and Ors [2006] WADC 200</lnci:content>
</lnci:cite>
</ref:cite4thisresource>
Note: If case:courtcite/ci:cite/@type="cite4thisdoc" then duplicate
all the ref:para in the document using the
lnci:au@courtcode value in
@para-scheme and
@paraschemetype="court-code". For more clarification please
refer the example below.
TODO: implement DITA <note> above:
If case:courtcite/ci:cite[@type="cite4thisdoc"] then duplicate all the ref:para in the document using the lnci:au@courtcode
value in @para-scheme and @paraschemetype="court-code". For more clarification please refer the example below.
catchwordgrp/catchwords becomes
caseinfo:caseinfo/classify:classification with the value of
classify:classification/@classscheme set to "catchwords". Each instance of
catchwords should be converted to its own
classify:classification[@classscheme="catchwords"] element. The children of
catchwords are converted as follows:
Note: Conversion should not create consecutive caseinfo:caseinfo elements. When 2 or more
consecutive sibling source elements map to caseinfo:caseinfo, data should be merged to
a single caseinfo:caseinfo element unless this would hamper content ordering.
Note: Exception for Pacific Content (AU): If nl occur within
catchwords/catchphrase then conversion should replace the nl
with a space.
Example: CA content
<catchwordgrp> <catchwords> <catchphrase>Zoning by-laws</catchphrase>
<catchphrase>Defendant's commercial greenhouse not permitted under prior by-law and therefore not a
continuing non-conforming legal use</catchphrase> <catchphrase>Municipality having right to
enforce by-law by injunction</catchphrase> <catchphrase>Planning Act, R.S.P.E.I. 1974, c. P-6, ss.
46(1)(e), (f), (g), 49, 52, 56</catchphrase> <catchphrase>Municipalities Act, R.S.P.E.I. 1974, c.
M-15.1, s. 1(b).</catchphrase> </catchwords> </catchwordgrp>
becomes
<classify:classification classscheme="catchwords"> <classify:classitem>
<classify:classitem-identifier> <classify:classname>Zoning by-laws</classify:classname>
</classify:classitem-identifier> </classify:classitem> <classify:classitem>
<classify:classitem-identifier> <classify:classname>Defendant's commercial greenhouse not
permitted under prior by-law and therefore not a continuing non-conforming legal
use</classify:classname> </classify:classitem-identifier> </classify:classitem>
<classify:classitem> <classify:classitem-identifier> <classify:classname>Municipality having
right to enforce by-law by injunction</classify:classname> </classify:classitem-identifier>
</classify:classitem> <classify:classitem> <classify:classitem-identifier>
<classify:classname>Planning Act, R.S.P.E.I. 1974, c. P-6, ss. 46(1)(e), (f), (g), 49, 52,
56</classify:classname> </classify:classitem-identifier> </classify:classitem>
<classify:classitem> <classify:classitem-identifier> <classify:classname>Municipalities Act,
R.S.P.E.I. 1974, c. M-15.1, s. 1(b).</classify:classname> </classify:classitem-identifier>
</classify:classitem> </classify:classification>
Example: CA content catchwordgrp with child heading
<catchwordgrp> <heading> <title>Indexation :</title> </heading>
<catchwords> <catchphrase>Assurance</catchphrase> <catchphrase>Assurance
automobile</catchphrase> <catchphrase>Régime d'indemnisation sans égard à la
responsabilité</catchphrase> ... </catchwords> </catchwordgrp>
becomes
<classify:classification classscheme="catchwords"> <heading> <title>Indexation
:</title> </heading> <classify:classitem> <classify:classitem-identifier>
<classify:classname>Assurance</classify:classname> </classify:classitem-identifier>
</classify:classitem> <classify:classitem> <classify:classitem-identifier>
<classify:classname>Assurance automobile</classify:classname>
</classify:classitem-identifier> </classify:classitem> <classify:classitem>
<classify:classitem-identifier> <classify:classname>Régime d'indemnisation sans égard à la
responsabilité</classify:classname> </classify:classitem-identifier> </classify:classitem>
... </classify:classification>
Example: AU content
<catchwordgrp> <catchwords> <catchphrase>Practice and
procedure</catchphrase> <catchphrase>Applications</catchphrase> <catchphrase>Applicant
sought declaration that insurance agents were independent contractors</catchphrase>
<catchphrase>Agents had already commenced proceedings in the Chief Industrial Magistrates Court of NSW
claiming entitlements</catchphrase> </catchwords> </catchwordgrp>
becomes
<classify:classification classscheme="catchwords"> <classify:classitem>
<classify:classitem-identifier> <classify:classname>Practice and
procedure</classify:classname> </classify:classitem-identifier> </classify:classitem>
<classify:classitem> <classify:classitem-identifier>
<classify:classname>Applications</classify:classname> </classify:classitem-identifier>
</classify:classitem> <classify:classitem> <classify:classitem-identifier>
<classify:classname>Applicant sought declaration that insurance agents were independent
contractors</classify:classname> </classify:classitem-identifier> </classify:classitem>
<classify:classitem> <classify:classitem-identifier> <classify:classname>Agents had already
commenced proceedings in the Chief Industrial Magistrates Court of NSW claiming
entitlements</classify:classname> </classify:classitem-identifier> </classify:classitem>
</classify:classification>
<catchwordgrp> <catchwords> <catchphrase>Copyright – Compilation
– No evidence of any specific infringement – Declaratory judgment – Possible
infringement by documents not yet in existence – RSC Ord XXV, r 5.</catchphrase>
</catchwords> </catchwordgrp>
becomes
<classify:classification classscheme="catchwords"> <classify:classitem>
<classify:classitem-identifier> <classify:classname>Copyright – Compilation
– No evidence of any specific infringement – Declaratory judgment – Possible
infringement by documents not yet in existence – RSC Ord XXV, r 5.</classify:classname>
</classify:classitem-identifier> </classify:classitem> </classify:classification>
Note: If the punctuation marks occuring between catchwords and
catchphrase conversion should drop these punctuation in output this will be handle by
stylesheet.
Note: If the punctuation marks occuring inside the catchphrase then, these will be retain
in output.
Example: UK content, punctuation marks occuring between catchwords and
catchphrase
<catchwordgrp> <catchwords> ( <catchphrase>Comitology</catchphrase> —
<catchphrase>Council Decision 1999/468/EC laying down the procedures for the exercise of implementing
powers conferred on the Commission</catchphrase> — <catchphrase>Criteria for choosing between the
different procedures for adopting implementing measures</catchphrase> —
<catchphrase>Effects</catchphrase> — <catchphrase>Obligation to state
reasons</catchphrase> — <catchphrase>Annulment in part of Regulation (EC) No 1655/2000 of the
European Parliament and of the Council concerning the Financial Instrument for the Environment
(LIFE)</catchphrase> ) </catchwords> </catchwordgrp> becomes
<classify:classification classscheme="catchwords"> <classify:classitem>
<classify:classitem-identifier> <classify:classname>Comitology</classify:classname>
</classify:classitem-identifier> <classify:classitem-identifier> <classify:classname>Council
Decision 1999/468/EC laying down the procedures for the exercise of implementing powers conferred on the
Commission</classify:classname> </classify:classitem-identifier>
<classify:classitem-identifier> <classify:classname>Criteria for choosing between the different
procedures for adopting implementing measures</classify:classname>
</classify:classitem-identifier> <classify:classitem-identifier>
<classify:classname>Effects</classify:classname> </classify:classitem-identifier>
<classify:classitem-identifier> <classify:classname>Obligation to state
reasons</classify:classname> </classify:classitem-identifier>
<classify:classitem-identifier> <classify:classname>Annulment in part of Regulation (EC) No
1655/2000 of the European Parliament and of the Council concerning the Financial Instrument for the
Environment (LIFE)</classify:classname> </classify:classitem-identifier>
</classify:classitem> </classify:classification>
<xsl:template match="catchwords"><!-- Original Target XPath: caseinfo:caseinfo/classify:classification/heading --><!-- Sudhanshu 5 May 2017- implemented for CA01 --><!--
<xsl:choose>
<xsl:when test="$streamID = 'CA01'">
<caseinfo:caseinfo>
<classify:classification>
<xsl:attribute name="classscheme">
<xsl:text>catchwords</xsl:text>
</xsl:attribute>
<xsl:apply-templates select="preceding-sibling::heading"/>
<xsl:apply-templates select="@* | node() except page"/>
</classify:classification>
</caseinfo:caseinfo>
</xsl:when>
<xsl:when test="$streamID = 'HK03'">
<classify:classification>
<xsl:attribute name="classscheme">
<xsl:text>catchwords</xsl:text>
</xsl:attribute>
<xsl:apply-templates select="preceding-sibling::heading"/>
<xsl:apply-templates select="@* | node() | child::page"/>
</classify:classification>
</xsl:when>
<xsl:otherwise>--><!-- Awantika: 2017-10-30- checking for empty catchwords element, As catchwords is coming blank in source for AU01,
therefore empty classify:classification is being created and thus resulting in validation --><xsl:if test=".!=''"><classify:classification><xsl:attribute name="classscheme"><xsl:text>catchwords</xsl:text></xsl:attribute><xsl:apply-templates select="preceding-sibling::heading"/><xsl:apply-templates select="@* | node() except page"/></classify:classification></xsl:if><!-- </xsl:otherwise>
</xsl:choose>
--><!-- MDS 2017-06-21 - The if and all to the named template are not needed.
The apply-templates only runs with a page child exists.
The named template (located in Rosetta_catchwordgrp_page.xsl) already only functions when page has a parent catchwordgrp or catchwords.
--><xsl:apply-templates select="page[not($streamID='HK03')]"/><!--<xsl:if test="child::page">
<xsl:call-template name="page"/>
</xsl:if>--><!--<xsl:if test="page">
<classify:classification>
<classify:classitem>
<classify:classitem-identifier>
<classify:classname>
<xsl:apply-templates select="page"/>
</classify:classname>
</classify:classitem-identifier>
</classify:classitem>
</classify:classification>
</xsl:if>--></xsl:template>
Template
catchwordgrp/heading
Namespace
No namespace
Match
catchwordgrp/heading
Mode
#default
Import precedence
0
Source
<xsl:template match="catchwordgrp/heading"><!-- Original Target XPath: caseinfo:caseinfo/classify:classification/heading --><heading><xsl:apply-templates select="@* | node()"/></heading></xsl:template>
Template
catchwords/text()[following::catchphrase or preceding::catchphrase]
If the punctuation marks occuring between catchwords and catchphrase conversion should drop these punctuation in output this will be
handle by stylesheet.
Awntika-2017-11-15- Updated for webstar 7047020, where text is coming outside catchphrase and it should be taken inside
classify:classname and text should drop from the caseinfo:caseinfo
Namespace
No namespace
Match
catchwords/text()[following::catchphrase or preceding::catchphrase]
<xsl:template match="catchwords/catchphrase"><!-- Original Target XPath: classify:classification/classify:classitem/classify:classitem-identifier/classify:classname --><!-- JD: 2017-06-15: I can find no instruction for creating @classscheme='catchphrase' in id-CCCC-12023 --><classify:classitem><!-- classscheme="catchphrase">--><xsl:if test="$streamID=('AU13','UK02','HK09')"><xsl:attribute name="classscheme">catchphrase</xsl:attribute></xsl:if><classify:classitem-identifier><classify:classname><xsl:apply-templates select="@* | node()"/><!-- Awantika: 2017-11-15- Updated for webstar 7047020, where text is coming outside catchphrase and it should be taken inside
classify:classname and text should drop from the caseinfo:caseinfo--><xsl:if test="$streamID='AU01' and following-sibling::text()[1]"><xsl:value-of select="./following-sibling::text()[1]"/></xsl:if></classify:classname></classify:classitem-identifier></classify:classitem></xsl:template>
Template
catchphrase
Documentation
Description
<xsl:template match="nl">
<!-\- Original Target XPath: -\->
<!-\- Could not determine target element or attribute name: <> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </> -\->
</xsl:template>
Namespace
No namespace
Match
catchphrase
Mode
#default
Import precedence
0
Source
<xsl:template match="catchphrase"><!-- Original Target XPath: --><!-- Could not determine target element or attribute name: <> --><xsl:apply-templates select="@* | node()"/><!-- Could not determine target element or attribute name: </> --></xsl:template>
Template
page[parent::catchwordgrp or parent::catchwords]page
<catchwordgrp>
<catchwords>
<catchphrase>Emergency Legislation – Trading with the enemy – Guarantee by English
company of debt due to neutral by German company – Whether payment under guarantee for
benefit or in discharge of obligation of enemy <ci:cite searchtype="LEG-REF" status="valid">
<ci:sesslaw>
<ci:sesslawinfo>
<ci:sesslawnum num="1939_89a"/>
<ci:hierpinpoint>
<ci:hierlev label="section" num="1"/>
</ci:hierpinpoint>
</ci:sesslawinfo>
<ci:sesslawref>
<ci:standardname normpubcode="UK_ACTS"/>
</ci:sesslawref>
</ci:sesslaw>
<ci:content>Trading with the Enemy Act 1939 (c 89), s 1(2)(a) </ci:content>
</ci:cite>. </catchphrase>
</catchwords>
<page text="[1941] 1 All ER 257 at " count="258" reporter="ALLER"/>
</catchwordgrp>
becomes
<classify:classification classscheme="catchwords">
<classify:classitem>
<classify:classitem-identifier>
<classify:classname> Emergency Legislation – Trading with the enemy – Guarantee
by English company of debt due to neutral by German company – Whether payment under
guarantee for benefit or in discharge of obligation of enemy <lnci:cite status="valid">
<lnci:sesslaw>
<lnci:sesslawinfo>
<lnci:sesslawnum num="1939_89a"/>
<lnci:hierpinpoint>
<lnci:hierlev label="section" num="1"/>
</lnci:hierpinpoint>
</lnci:sesslawinfo>
<lnci:sesslawref>
<lnci:standardname normpubcode="UK_ACTS"/>
</lnci:sesslawref>
</lnci:sesslaw>
<lnci:content>Trading with the Enemy Act 1939 (c 89), s 1(2)(a) </lnci:content>
</lnci:cite>. </classify:classname>
</classify:classitem-identifier>
</classify:classitem>
</classify:classification>
<classify:classification classscheme="catchwords">
<classify:classitem>
<classify:classitem-identifier>
<classify:classname>
<ref:page num="258" page-scheme="ALLER" page-scheme-type="reporterabbreviation"/>
</classify:classname>
</classify:classitem-identifier>
</classify:classitem>
</classify:classification>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_caselaw\Rosetta_catchwordgrp_page.dita
Namespace
No namespace
Match
page[parent::catchwordgrp or parent::catchwords]
Mode
#default
Import precedence
0
Source
<xsl:template match="page[parent::catchwordgrp or parent::catchwords]" name="page"><!-- Original Target XPath: classify:classification/classify:classitem/classify:classitem-identifier/classify:classname/ref:page --><classify:classification><classify:classitem><classify:classitem-identifier><classify:classname><ref:page><xsl:attribute name="num"><xsl:value-of select="@count"/></xsl:attribute><!-- JD: 2017-07-12: added if test to prevent schema validation errors
"cvc-datatype-valid.1.2.1: '' is not a valid value for 'NMTOKEN'."
and
"cvc-attribute.3: The value '' of attribute 'page-scheme' on element 'ref:page' is not valid with respect to its type, 'NMTOKEN'." --><xsl:if test="normalize-space(@reporter)!=''"><xsl:attribute name="page-scheme"><xsl:value-of select="@reporter"/></xsl:attribute></xsl:if><xsl:attribute name="page-scheme-type"><xsl:text>reporter-abbreviation</xsl:text></xsl:attribute></ref:page></classify:classname></classify:classitem-identifier></classify:classitem></classify:classification></xsl:template>
Template
case:factsummarysummaries
Documentation
Description
The attributes of case:factsummary are handled as follows:
Note: Conversion should not create consecutive casesum:summaries
elements. When 2 or more consecutive sibling source elements map to
casesum:summaries, target data should be merged to a single
casesum:summaries element unless this would hamper content
ordering.
Note: Andrew: Editorially added content.
<case:factsummary>
<p>
<text>The respondents (the agents) were engaged by Combined as insurance agents. The respondents commenced proceedings in the Chief Industrial Magistrates Court of NSW (Industrial Court) claiming entitlements to annual and long service leave. That court’s jurisdiction to make orders was conferred by the Workplace Relations Act 1996 (Cth). Combined commenced proceedings in the Federal Court seeking declarations that the respondents were independent contractors. It also sought an indemnity from each agent for misrepresenting that each was an independent contractor if they were not; and damages. On 27 April 2009, the agents filed a notice of motion seeking that the proceedings against them be dismissed primarily on the basis none of the claims was in federal jurisdiction.
</text>
</p>
</case:factsummary>
becomes
<casesum:summaries>
<casesum:editorialsummary>
<p>
<text>The respondents (the agents) were engaged by Combined as insurance agents. The respondents commenced proceedings in the Chief Industrial Magistrates Court of NSW (Industrial Court) claiming entitlements to annual and long service leave. That court’s jurisdiction to make orders was conferred by the Workplace Relations Act 1996 (Cth). Combined commenced proceedings in the Federal Court seeking declarations that the respondents were independent contractors. It also sought an indemnity from each agent for misrepresenting that each was an independent contractor if they were not; and damages. On 27 April 2009, the agents filed a notice of motion seeking that the proceedings against them be dismissed primarily on the basis none of the claims was in federal jurisdiction.
</text>
</p>
</casesum:editorialsummary>
</casesum:summaries>
<case:factsummary>
<l>
<li>
<lilabel><emph typestyle="ro">…</emph></lilabel>
<p>
<text></text>
</p>
</li>
<li>
<lilabel><emph typestyle="ro">(d)</emph></lilabel>
<p>
<text>in the opinion of the Commission, the death of the veteran was due to an accident that would not have occurred, or to a disease that would not have been contracted, but for his or her having rendered eligible war service or but for changes in the veteran's environment consequent upon his or her having rendered eligible war service …”</text>
</p>
</li>
</l>
<p><text>Counsel for W relied upon dictionary definitions of “consequent upon” to mean “following as a result” and “following logically”.</text>
</p>
</case:factsummary>
becomes
<casesum:summaries>
<casesum:editorialsummary>
<p>
<list>
<listitem>
<label><emph typestyle="ro">…</emph></label>
<p>
<text></text>
</p>
</listitem>
<listitem>
<label><emph typestyle="ro">(d)</emph></label>
<p>
<text>in the opinion of the Commission, the death of the veteran was due to an accident that would not have occurred, or to a disease that would not have been contracted, but for his or her having rendered eligible war service or but for changes in the veteran's environment consequent upon his or her having rendered eligible war service …”</text>
</p>
</listitem>
</list>
</p>
<p>
<text>Counsel for W relied upon dictionary definitions of “consequent upon” to mean “following as a result” and “following logically”.</text>
</p>
</casesum:editorialsummary>
</casesum:summaries>
Description
end topicref ../../common_caselaw/Rosetta_catchwordgrp.dita
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.factsummary-LxAdv_casesum.editorialsummary.dita
<case:decisionsummary summarytype="held">
<p>
<text>
<emph typestyle="bf">Held</emph>, dismissing the motion:
</text>
</p>
<p>
<text>(i) The proceedings before the Industrial Court were wholly in federal jurisdiction. The claim by Combined against each agent in the Federal Court and the claim by each agent against Combined in the Industrial Court arose largely out of the same substratum of fact. It followed there was, as between each agent and Combined, a single matter comprising the basic question of whether each agent was an employee, related questions of estoppel and misleading conduct and remedial issues relating to money and penalties: at [13], [16].
</text>
</p>
</case:decisionsummary>
becomes
<casesum:summaries>
<casesum:decisionsummary summarysource="held">
<bodytext>
<p>
<text><emph typestyle="bf">Held</emph>, dismissing the motion:</text>
</p>
<p>
<text>(i) The proceedings before the Industrial Court were wholly in federal jurisdiction. The claim by Combined against each agent in the Federal Court and the claim by each agent against Combined in the Industrial Court arose largely out of the same substratum of fact. It followed there was, as between each agent and Combined, a single matter comprising the basic question of whether each agent was an employee, related questions of estoppel and misleading conduct and remedial issues relating to money and penalties: at [13], [16].
</text>
</p>
</bodytext>
</casesum:decisionsummary>
</casesum:summaries>
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.decisionsummary-LxAdv_casesum.decisionsummary.dita
With the exception of heading, all children of
case:references should be mapped to children of
ref:relatedrefs/bodytext.
Canada streams only:
Please refer the below table for the following scenario: If initial contents of
case:references equals first column of table then (either within
heading/title, text/emph typestyle="bf", etc), add an attribute
@referencetype and set the value
@referencetype= second column of table. See CA Example 2 &
3.
Unique Values for search
Replace attribute Value
Articles cited:
consideredcases
Authorities Cited:
consideredcases
Authorities cited:
consideredcases
Authorities Considered:
consideredcases
Authors and Works cited:
consideredcases
AUTHORS AND WORKS JUDICIALLY NOTICED:
consideredcases
AUTHORS AND WORKS NOTICED:
consideredcases
Authors and Works Noticed:
consideredcases
Authors Cited
consideredcases
Authors cited
consideredcases
Autorité citée :
consideredcases
Autorités :
consideredcases
Autorités citées :
consideredcases
CASE CITED:
consideredcases
Cases Cited
consideredcases
CASES CITED:
consideredcases
Cases Cited:
consideredcases
Cases cited:
consideredcases
Cases Considered:
consideredcases
CASES JUDICIALLY CONSIDERED
consideredcases
Cases Judicially Considered
consideredcases
CASES JUDICIALLY NOTICED:
consideredcases
CASES NOTICED:
consideredcases
Cases Noticed:
consideredcases
Décision citée :
consideredcases
Décisions citées :
consideredcases
DOCTRINE
consideredcases
Doctrine
consideredcases
Doctrine citée
consideredcases
JURISPRUDENCE
consideredcases
Jurisprudence
consideredcases
Jurisprudence citée
consideredcases
Jurisprudence citée :
consideredcases
Jurisprudence consultée :
consideredcases
Législation citée :
legislation
Lois et règlements
legislation
Lois et règlements cités
legislation
MISCELLANEOUS WORKS CITED:
consideredcases
Statutes and Regulations Cited
legislation
STATUTES AND REGULATIONS CITED:
legislation
Statutes and Regulations cited:
legislation
Statutes and Regulations Judicially Considered
legislation
Statutes Cited:
legislation
Statutes cited:
legislation
STATUTES JUDICIALLY NOTICED:
legislation
STATUTES NOTICED:
legislation
Statutes Noticed:
legislation
Statutes, Regulations and Rule Cited:
legislation
Statutes, Regulations and Rules cited
legislation
STATUTES, REGULATIONS AND RULES CITED:
legislation
Statutes, Regulations and Rules Cited:
legislation
Authorities Cited
consideredcases
Authors Cited
consideredcases
Cases and texts cited
consideredcases
CASES CITED
consideredcases
Cases Cited
consideredcases
Cases cited
consideredcases
Doctrine citée
consideredcases
Jurisprudence
consideredcases
Législation citée
legislation
Lois et règlements cités
legislation
MISCELLANEOUS WORKS CITED
consideredcases
Statutes and Regulations Cited
legislation
Statutes cited
legislation
STATUTES, REGULATIONS AND RULES CITED
legislation
Statutes, Regulations and Rules Cited
legislation
Statutes, Regulations and Rules cited
legislation
Législation citée:
legislation
JURISPRUDENCE CITÉE :
consideredcases
Affaire citée:
consideredcases
Affaires citées:
consideredcases
Affaires citées:
consideredcases
Authorities & Texts:
consideredcases
Authorities
consideredcases
Autorités citées *
consideredcases
Autorités citées par l'appelante :
consideredcases
Autorités citées par l'intimé :
consideredcases
Autorités citées
consideredcases
Case Authorities and Texts:
consideredcases
Cases considered:
consideredcases
Cases referred to:
consideredcases
Dictionnaire cité :
consideredcases
Jurisprudence :
consideredcases
Jurisprudence :
consideredcases
JURISPRUDENCE DÉPOSÉE PAR L'INTIMÉE
consideredcases
Jurisprudence soumise
consideredcases
Jurisprudence:
consideredcases
Législation citée:
legislation
Liste de jurisprudence
legislation
Liste des jugements à l'appui:
consideredcases
LISTE DES JUGEMENTS À L'APPUI
consideredcases
Loi citée:
legislation
Lois citées:
legislation
Lois et règlements cités :
legislation
Par l'intimé :
consideredcases
Statutes considered:
legislation
Statutes Referred to:
legislation
Statutes referred to:
legislation
Tribunal decisions considered:
consideredcases
STATUTE AND REGULATION CITED
legislation
STATUTES AND REGULATION CITED
legislation
STATUTES AND REGULATION CITED:
legislation
REGULATION CITED
legislation
STATUTE CITED
legislation
Rules and Regulations considered
legislation
Lois, règlements et règles cités:
legislation
STATUTES, RULES AND REGULATIONS CITED
legislation
Rules cited
legislation
Regulations Cited
legislation
Lois et règlement cités
legislation
LOI ET RÈGLEMENT CITÉS
legislation
RÈGLEMENT CITÉ
legislation
STATUTES, RULES AND REGULATIONS CITED
legislation
Autorités consultées:
consideredcases
AUTORITÉS CONSULTÉES
consideredcases
Autorités citées par la requérante:
consideredcases
Autres autorités consultées
consideredcases
Case Authorities Referred to
consideredcases
Liste des autorités citées
consideredcases
JURISPRUDENCE CITÉE
consideredcases
Doctrine et jurisprudence :
consideredcases
Cases referred to
consideredcases
LEGISLATION:
legislation
Doctrine et jurisprudence
consideredcases
Note:
Remove the colon (:) or space colon ( :) which comes under
ref:relatedrefs under
heading/title.
Avocats: to Avocats
Avocats : to Avocats
Cases cited: to Cases cited
Cases Cited: to Cases Cited
Jurisprudence cite : to Jurisprudence
cite
Statutes, Regulations and Rules Cited: to
Statutes, Regulations and Rules Cited
Législation citée : to Législation
citée
Authors and Texts Cited: to Authors and Texts
Cited
Texts Cited: to Texts Cited
Causes citées et consultées : to Causes citées
et consultées
Jurisprudence et doctrine citées et consultées : to
Jurisprudence et doctrine citées et
consultées
Doctrine et jurisprudence citées : to Doctrine
et jurisprudence citées
<xsl:template match="case:references"><xsl:variable name="case-data" select="normalize-space(.)"/><xsl:choose><!--SP LBU needs this via conversation with product lawyers--><xsl:when test="$streamID=('CA19')"><xsl:choose><xsl:when test="count($references//reference[starts-with($case-data,./@key)[1]])>0"><courtfiling:citedauthorities><!-- Awantika: Updated if heading is coming --><xsl:apply-templates select="heading"/><bodytext><!--SP: For CA19, there is currently no need to process the referencetype attribute on case:references--><xsl:apply-templates select=" node() except (heading | @referencetype)"/></bodytext></courtfiling:citedauthorities></xsl:when><xsl:otherwise><courtfiling:citedauthorities><xsl:apply-templates select="heading"/><bodytext><!--SP: For CA19, there is currently no need to process the referencetype attribute on case:references--><xsl:apply-templates select=" node() except (heading | @referencetype)"/></bodytext></courtfiling:citedauthorities></xsl:otherwise></xsl:choose></xsl:when><!-- Awantika: Please add stream ID as per the requirement --><xsl:when test="$streamID=('CA01','CA02CC','CA04','CA05')"><xsl:choose><xsl:when test="count($references//ext:reference[starts-with($case-data,./@key)[1]])>0"><ref:relatedrefs><xsl:attribute name="referencetype"><xsl:value-of select="($references//ext:reference[starts-with($case-data,./@key)[1]]/@value)[1]"/></xsl:attribute><!-- Awantika: Updated if heading is coming --><xsl:apply-templates select="heading"/><bodytext><xsl:apply-templates select="@* | node() except heading"/></bodytext></ref:relatedrefs></xsl:when><xsl:otherwise><ref:relatedrefs><xsl:apply-templates select="heading"/><bodytext><xsl:apply-templates select="@* | node() except heading"/></bodytext></ref:relatedrefs></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><ref:relatedrefs><xsl:apply-templates select="@*"/><xsl:apply-templates select="heading"/><bodytext><xsl:apply-templates select="node() except heading"/></bodytext></ref:relatedrefs></xsl:otherwise></xsl:choose></xsl:template>
JD: 2017-06-15: adding for UK01; although it's not mentioned in the CI it is shown in examples.
Hard to see any downside to mapping case:references/@referencytype to ref:relatedrefs/@referencetype
case:citations becomes ref:relatedrefs with
an attribute 'referencetype' set to @referencetype="case-citations"
which contains case:citetext becomes
ref:relatedrefs/bodytext/p/text
<case:citations>
<heading>
<title>C<emph typestyle="smcaps">ASES</emph> C<emph typestyle="smcaps">ITED</emph></title>
</heading>
<case:citetext>The following cases are cited in the judgment:<nl/>
<ci:cite searchtype="CASE-REF">
<ci:content>
<citefragment searchtype="CASE-NAME-REF"><emph typestyle="it">Allgood v Blake</emph></citefragment>
<citefragment searchtype="CASE-CITE-REF">(1873) LR 8 Exch 160</citefragment>.
</ci:content>
</ci:cite><nl/>
<ci:cite searchtype="CASE-REF">
<ci:content>
<citefragment searchtype="CASE-NAME-REF"><emph typestyle="it">Amber Holdings (Aust) Pty Ltd v Polona Pty Ltd</emph></citefragment>
<citefragment searchtype="CASE-CITE-REF">[1982] 2 NSWLR 470</citefragment>.
</ci:content>
</ci:cite><nl/>
</case:citetext>
</case:citations>
Becomes:
<ref:relatedrefs referencetype="case-citations">
<heading>
<title>C<emph typestyle="smcaps">ASES</emph> C<emph typestyle="smcaps">ITED</emph></title>
</heading>
<bodytext>
<p>
<text>The following cases are cited in the judgment:<proc:nl/>
<lnci:cite type="case">
<lnci:content>
<emph typestyle="it">Allgood v Blake</emph> (1873) LR 8 Exch 160
</lnci:content>
</lnci:cite><proc:nl/>
<lnci:cite type="case">
<lnci:content>
<emph typestyle="it">Amber Holdings (Aust) Pty Ltd v Polona Pty Ltd</emph> [1982] 2 NSWLR 470
</lnci:content>
</lnci:cite><proc:nl/>
</text>
</p>
</bodytext>
</ref:relatedrefs>
Description
<xsl:template match="">
<!-\- Original Target XPath: Avocats -\->
</xsl:template>
<xsl:template match="Avocats :">
<!-\- Original Target XPath: Avocats -\->
<Avocats>
<xsl:apply-templates select="@* | node()"/>
</Avocats>
</xsl:template>
<xsl:template match="Cases cited:">
<!-\- Original Target XPath: Casescited -\->
<Casescited>
<xsl:apply-templates select="@* | node()"/>
</Casescited>
</xsl:template>
<xsl:template match="Cases Cited:">
<!-\- Original Target XPath: CasesCited -\->
<CasesCited>
<xsl:apply-templates select="@* | node()"/>
</CasesCited>
</xsl:template>
<xsl:template match="Jurisprudence cite :">
<!-\- Original Target XPath: Jurisprudencecite -\->
<Jurisprudencecite>
<xsl:apply-templates select="@* | node()"/>
</Jurisprudencecite>
</xsl:template>
<xsl:template match="Statutes, Regulations and Rules Cited:">
<!-\- Original Target XPath: Statutes,RegulationsandRulesCited -\->
<!-\- Could not determine target element or attribute name: <Statutes,RegulationsandRulesCited> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </Statutes,RegulationsandRulesCited> -\->
</xsl:template>
<xsl:template match="Législation citée :">
<!-\- Original Target XPath: Législationcitée -\->
<!-\- Could not determine target element or attribute name: <Législationcitée> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </Législationcitée> -\->
</xsl:template>
<xsl:template match="Authors and Texts Cited:">
<!-\- Original Target XPath: AuthorsandTextsCited -\->
<AuthorsandTextsCited>
<xsl:apply-templates select="@* | node()"/>
</AuthorsandTextsCited>
</xsl:template>
<xsl:template match="Texts Cited:">
<!-\- Original Target XPath: TextsCited -\->
<TextsCited>
<xsl:apply-templates select="@* | node()"/>
</TextsCited>
</xsl:template>
<xsl:template match="Causes citées et consultées :">
<!-\- Original Target XPath: Causescitéesetconsultées -\->
<!-\- Could not determine target element or attribute name: <Causescitéesetconsultées> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </Causescitéesetconsultées> -\->
</xsl:template>
<xsl:template match="Jurisprudence et doctrine citées et consultées :">
<!-\- Original Target XPath: Jurisprudenceetdoctrinecitéesetconsultées -\->
<!-\- Could not determine target element or attribute name: <Jurisprudenceetdoctrinecitéesetconsultées> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </Jurisprudenceetdoctrinecitéesetconsultées> -\->
</xsl:template>
<xsl:template match="Doctrine et jurisprudence citées :">
<!-\- Original Target XPath: Doctrineetjurisprudencecitées -\->
<!-\- Could not determine target element or attribute name: <Doctrineetjurisprudencecitées> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </Doctrineetjurisprudencecitées> -\->
</xsl:template>
<xsl:template match="Doctrine citée :">
<!-\- Original Target XPath: Doctrinecitée -\->
<!-\- Could not determine target element or attribute name: <Doctrinecitée> -\-> <xsl:apply-templates select="@* | node()"/>
<!-\- Could not determine target element or attribute name: </Doctrinecitée> -\->
</xsl:template>
<xsl:template match="Counsel:">
<!-\- Original Target XPath: Counsel -\->
<Counsel>
<xsl:apply-templates select="@* | node()"/>
</Counsel>
</xsl:template>
<xsl:template match="case:citations/case:citetext"><xsl:variable name="name" select="local-name()"/><xsl:if test="local-name(preceding-sibling::*[position()=1]) != $name"><bodytext><p><text><xsl:apply-templates/></text></p><!-- Match the next sibling if it has the same name --><xsl:apply-templates select="following-sibling::*[1][local-name()=$name]" mode="next"/></bodytext></xsl:if></xsl:template>
Note: Conversion should not create consecutive casesum:summaries
elements. When 2 or more consecutive sibling source elements map to
casesum:summaries, target data should be merged to a single
casesum:summaries element unless this would hamper content
ordering.
Note:
For information on how to process the attribute @ln.user-displayed. Refer
common_rosetta_ln.user_displayed for handling of
@ln.user-displayed
<xsl:template match="case:body"><!-- Original Target XPath: courtcase:body --><courtcase:body><!-- Vikas Rohilla : added for the streamID = CA01 --><xsl:apply-templates select="//case:info/case:constituents[not(ancestor::case:appendix)][$streamID='CA01']"/><!--Satbir: Define these element "case:typeofcase and case:judgement" as a optional for maintain order of elements--><xsl:apply-templates select="case:content/case:typeofcase | case:content/case:judgments"/><!--<xsl:apply-templates select="case:content/case:judgments"/>--><!--<xsl:apply-templates select="case:content/case:judgments/case:judgment/case:courtinfo/case:judges[ancestor::case:content]"/>--><!--<xsl:apply-templates select="case:content/case:judgments/case:constituents"/>--><!--<xsl:apply-templates select="case:content/case:judgments/case:disposition"/>--><!--<xsl:apply-templates select="case:content/case:judgments/case:appendix"/>--><xsl:apply-templates select="case:courtinfo"/><xsl:apply-templates select="case:content/case:author"/><xsl:apply-templates select="case:content/case:appendix[not(parent::case:judgments)]|case:content/case:appendix[$streamID='CA01']"/><xsl:apply-templates select="case:content/page"/><!-- JD: 2017-12-01: supporting dropped <note> content per email from Chuck 2017-12-01/10:41AM.
Rather than specifically process just <note>, process anything not handled above. Limit to UK01 for now.
--><xsl:if test="$streamID='UK01'"><xsl:apply-templates select="case:content/* except(case:content/case:typeofcase,case:content/case:judgments,case:content/case:author,case:content/case:appendix,case:content/page)"/></xsl:if><!-- <xsl:apply-templates select="case:content/case:author"/>--><!--<xsl:apply-templates select="case:content/case:judgments"/>
<xsl:apply-templates select="case:content/page"/>
<xsl:apply-templates select="case:content/case:typeofcase"/>
<xsl:apply-templates select="case:content/case:appendix[not(parent::case:judgments)]"/>
<xsl:apply-templates select="case:content/case:judgments/case:constituents"/>
<xsl:apply-templates select="case:content/case:author"/>
<xsl:apply-templates select="@* | node() except case:info[parent::case:headnote]"/>--></courtcase:body></xsl:template>
Note: If page element occurs as direct child of case:content then conversion need to move
ref:page as direct child of courtcase:body, i.e,
case:content/page becomes courtcase:body/ref:page.
Note: If case:appendix element occurs as direct child of case:content then conversion
need to move attachments/appendix as direct child of courtcase:body, i.e,
case:content/case:appendix becomes courtcase:body/attachments/appendix.
With the exception of heading, all children of
case:typeofcase should be mapped to children of
casesum:overview/bodytext.
Note: Conversion should not create consecutive casesum:summaries
elements. When 2 or more consecutive sibling source elements map to
casesum:summaries, target data should be merged to a
single casesum:summaries element unless this would hamper
content ordering.
Example: AU content
<case:typeofcase>
<heading>
<title>Application</title>
</heading>
<p>
<text>This was an application by notice of motion to amend an application to the tribunal for the restoration of credit charges to certain contracts.</text>
</p>
</case:typeofcase>
becomes
<casesum:overview>
<heading>
<title>Application</title>
</heading>
<bodytext>
<p>
<text>This was an application by notice of motion to amend an application to the tribunal for the restoration of credit charges to certain contracts.</text>
</p>
</bodytext>
</casesum:overview>
Example: NZ content
<case:typeofcase>
<heading>
<title>ACTION</title>
</heading>
<p>
<text>claiming writs of certiorari and prohibition and a declaration.</text>
</p>
<p>
<text>Early in the month of September 1959, Mrs Kettle (the second defendant) became the licensee under a wholesale licence in respect of certain premises situated at Waite Street, Greymouth. Shortly afterwards she filed applications (1) for a temporary transfer of the licence pursuant to s. 120 of the Licensing Act 1908 to a limited company called Kettle Bros. Ltd. (the third defendant) and (2) for a permanent transfer of the licence pursuant to ss. 118 and 119 of the Act to the same company. The temporary transfer was granted on 29 September 1959 with the effect set out in s. 120 (3) of the Act — namely, to authorise Kettle Bros. Ltd. to carry on the business specified in the licence at the Waite Street premises until the next quarterly licensing meeting to be held by the Westland District Licensing Committee (the first defendant, hereinafter called "the Licensing Committee").</text>
</p>
</case:typeofcase>
becomes
<casesum:overview>
<heading>
<title>ACTION</title>
</heading>
<bodytext>
<p>
<text>claiming writs of certiorari and prohibition and a declaration.</text>
</p>
<p>
<text>Early in the month of September 1959, Mrs Kettle (the second defendant) became the licensee under a wholesale licence in respect of certain premises situated at Waite Street, Greymouth. Shortly afterwards she filed applications (1) for a temporary transfer of the licence pursuant to s. 120 of the Licensing Act 1908 to a limited company called Kettle Bros. Ltd. (the third defendant) and (2) for a permanent transfer of the licence pursuant to ss. 118 and 119 of the Act to the same company. The temporary transfer was granted on 29 September 1959 with the effect set out in s. 120 (3) of the Act — namely, to authorise Kettle Bros. Ltd. to carry on the business specified in the licence at the Waite Street premises until the next quarterly licensing meeting to be held by the Westland District Licensing Committee (the first defendant, hereinafter called "the Licensing Committee").</text>
</p>
</bodytext>
</casesum:overview>
Example: AU content
<case:typeofcase>
<pgrp>
<heading>
<title>Appeal</title>
</heading>
<p>
<text>This was an appeal by the one of the defendants against a decision of Mandie J in the Trial Division awarding the plaintiffs damages in a claim brought against the defendant investment advisers pursuant to s 819 of the Corporations Law. The facts are stated in the judgment.</text>
</p>
</pgrp>
</case:typeofcase>
becomes
<casesum:overview>
<bodytext>
<pgrp>
<heading>
<title>Appeal</title>
</heading>
<p>
<text>This was an appeal by the one of the defendants against a decision of Mandie J in the Trial Division awarding the plaintiffs damages in a claim brought against the defendant investment advisers pursuant to s 819 of the Corporations Law. The facts are stated in the judgment.</text>
</p>
</pgrp>
</bodytext>
</casesum:overview>
Example: NZ content
<case:typeofcase>
<p>
<text>MOTION for argument of questions of law on the pleadings in the action.</text>
</p>
<p>
<text>The statement of claim alleged—</text>
</p>
<l>
<li>
<lilabel> </lilabel>
<p>
<text>1. That the plaintiff was a member of the Church of England and a parishioner of the Parish of Avonside, and the defendant was the incumbent of the said parish.</text>
</p>
</li>
</l>
<l>
<li>
<lilabel> </lilabel>
<p>
<text>2. That on Sunday, the 23rd of September, 1889, the defendant as such incumbent held the service of the Holy Communion, and that the plaintiff attended the service and duly presented herself to receive the Sacrament of the Holy Communion.</text>
</p>
</li>
</l>
</case:typeofcase>
becomes
<casesum:overview>
<bodytext>
<p>
<text>MOTION for argument of questions of law on the pleadings in the action.</text>
</p>
<p>
<text>The statement of claim alleged—</text>
</p>
<list>
<listitem>
<label> </label>
<p>
<text>1. That the plaintiff was a member of the Church of England and a parishioner of the Parish of Avonside, and the defendant was the incumbent of the said parish.</text>
</p>
</listitem>
</list>
<list>
<listitem>
<label> </label>
<p>
<text>2. That on Sunday, the 23rd of September, 1889, the defendant as such incumbent held the service of the Holy Communion, and that the plaintiff attended the service and duly presented herself to receive the Sacrament of the Holy Communion.</text>
</p>
</listitem>
</list>
</bodytext>
</casesum:overview>
Description
start topichead CaseContent
<topicref href="AU01_Rosetta_case.content.dita"/>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-PAC\AU01_CaseLaw\AU01_Rosetta_case.content.dita
Note: The child element attachments is used to house
inlineobject information in the opinions. The LBU
indicated that this use case is for attachments.
When case:dates appears as direct of
case:judgments then conversion need to omit tag
(case:dates) and retain content in this particular
context and create decision:decisiondate as direct child of
courtcase:opinions, i.e.,
case:judgments/case:dates/case:decisiondate becomes
courtcase:opinions/decision:decisiondate.
The attribute decision:decisiondate/@normdate should be
populated with the values of case:decisiondate/date/@year,
case:decisiondate/date/@month and
case:decisiondate/date/@day concatenated and separated by
a single hyphen. The values of case:decisiondate/date/@month
and case:decisiondate/date/@day should be padded with zeroes
so that they are 2 digits.
Note: If one or more of the three date values (year, month or day) are absent, then
decision:decisiondate/@normdate should not be
populated.
<case:judgment subdoc="true" toc-caption="Perram J.">
<case:judgmentbody>
<pgrp>
<heading>
<title>Background</title>
</heading>
<p>
<pnum count="1">[1]</pnum>
<text>The present applicants are five individuals who at one time or another were engaged by
Combined Insurance Company of America (Combined) as insurance agents. In recent times, the
five have sued Combined in the Chief Industrial Magistrates’ Court of New South
Wales claiming entitlements both to annual leave and long service leave. One of the
principal issues to be resolved in those proceedings is the question of whether the agents
were employees of Combined, as they contend, or rather independent contractors, as
Combined contends. No doubt the resolution of that issue will involve a close
consideration of a broad range of indicia. One of the matters to which Combined points is
a term in its contract with each agent by which each agreed, or appears to have agreed,
that his relationship with Combined was not one of employment.</text>
</p>
</pgrp>
</case:judgmentbody>
</case:judgment>
becomes
<courtcase:opinion includeintoc="true" alternatetoccaption="Perram J.">
<bodytext>
<pgrp>
<heading>
<title>Background</title>
</heading>
<p>
<desig value="1">[1]</desig>
<text>The present applicants are five individuals who at one time or another were engaged by
Combined Insurance Company of America (Combined) as insurance agents. In recent times, the
five have sued Combined in the Chief Industrial Magistrates’ Court of New South
Wales claiming entitlements both to annual leave and long service leave. One of the
principal issues to be resolved in those proceedings is the question of whether the agents
were employees of Combined, as they contend, or rather independent contractors, as
Combined contends. No doubt the resolution of that issue will involve a close
consideration of a broad range of indicia. One of the matters to which Combined points is
a term in its contract with each agent by which each agreed, or appears to have agreed,
that his relationship with Combined was not one of employment.</text>
</p>
</pgrp>
</bodytext>
</courtcase:opinion>
Note: Conversion should not create consecutive
caseinfo:caseinfo elements. When 2 or more
consecutive sibling source elements map to
caseinfo:caseinfo, data should be merged to a
single caseinfo:caseinfo element unless this would
hamper content ordering.
Note: Any nl elements inside
case:judges should be suppressed.
Note: Capture PCData for judges markup as is in New Lexis
and always create person:judge as an immediate child
of courtcase:judges or
courtcase:opinionby. For example: if there is a
Rosetta case:judges element and it just contains text
then conversion need to create person:judge as a
child of courtcase:judges or
courtcase:opinionby.
<case:judges>
Glazebrook, O’Regan and Baragwanath JJ
</case:judges>
Becomes
<courtcase:opinionby>
<person:judge>Glazebrook, O’Regan and Baragwanath JJ</person:judge>
</courtcase:opinionby>
OR
<courtcase:panel>
<courtcase:judges>
<person:judge>Glazebrook, O’Regan and Baragwanath JJ</person:judge>
</courtcase:judges>
<courtcase:panel>
Note: When emph is inside
case:judges and
@typestyle="smcaps" then conversion need to omit
tag (emph) and retain content.
<case:judgment>
<case:courtinfo>
<case:judges>
JUDGE M
<emph typestyle="smcaps">c</emph>
ELREA.
</case:judges>
</case:courtinfo>
...
</case:judgment>
Becomes
<courtcase:opinion>
<courtcase:opinionby>
JUDGE M
c
ELREA.
</courtcase:opinion>
</courtcase:opinion>
Note: Connecting punctuation and newlines or label text
ending with a colon preceding judges can be accomodated in the
judges markup. The colon should not be copied into the target xml however.
Note: A colon is inserted before case:judges in rosetta
xml. In rosetta this colon is used as a separator, that will be handled in
presentation spec for New Lexis for all cases.
<xsl:template match="case:judges[ancestor::case:headnote]"><xsl:choose><xsl:when test="@ln.user-displayed='false'"/><xsl:otherwise><courtcase:panel><courtcase:judges><!--SS: Added below condition for moving text() of case:courtinfo under target element courtcase:judges--><xsl:if test="preceding-sibling::text()[preceding-sibling::case:courtcode and following-sibling::case:judges and parent::case:courtinfo]"><xsl:value-of select="ancestor::case:courtinfo/text()[preceding-sibling::case:courtcode and following-sibling::case:judges]"/></xsl:if><!--RS: 2018-01-04: Added below condition for moving text() of case:courtinfo under target element courtcase:judges Webstar number #7078814 --><xsl:if test="normalize-space(preceding-sibling::text()[1]) = ':' and $streamID='AU01'"><xsl:value-of select="preceding-sibling::text()[1]"/></xsl:if><xsl:apply-templates select="@* | node()"/></courtcase:judges></courtcase:panel></xsl:otherwise></xsl:choose></xsl:template>
With the exception of heading, every child of
case:judgmentbody should be mapped to
courtcase:opinion/bodytext.
case:judgmentbody/heading becomes
courtcase:opinion/heading.
Example: CA content
<case:judgments>
<case:judgment>
<case:judgmentbody>
<p>
<text><emph typestyle="bf">MITCHELL, J.</emph> (for the Court, allowing the appeal): This
case concerns the interpretation of municipal bylaws and the availability of injunctive
relief to restrain their violation.</text>
</p>
...
</case:judgmentbody>
</case:judgment>
</case:judgments>
becomes
<courtcase:opinions>
<courtcase:opinion>
<bodytext>
<p>
<text><emph typestyle="bf">MITCHELL, J.</emph> (for the Court, allowing the appeal): This
case concerns the interpretation of municipal bylaws and the availability of injunctive
relief to restrain their violation.</text>
</p>
...
</bodytext>
</courtcase:opinion>
</courtcase:opinions>
Example: AU content
<case:judgmentbody>
<pgrp>
<heading><title>Background</title></heading>
<p>
<pnum count="1">[1]</pnum>
<text>The present applicants are five individuals who at one time or another were engaged by
Combined Insurance Company of America (Combined) as insurance agents. In recent times, the
five have sued Combined in the Chief Industrial Magistrates’ Court of New South Wales
claiming entitlements both to annual leave and long service leave. One of the principal
issues to be resolved in those proceedings is the question of whether the agents were
employees of Combined, as they contend, or rather independent contractors, as Combined
contends. No doubt the resolution of that issue will involve a close consideration of a
broad range of indicia. One of the matters to which Combined points is a term in its
contract with each agent by which each agreed, or appears to have agreed, that his
relationship with Combined was not one of employment.</text>
</p>
</pgrp>
...
</case:judgmentbody>
becomes
<courtcase:opinion>
<bodytext>
<pgrp>
<heading><title>Background</title></heading>
<p>
<desig value="1">[1]</desig>
<text>The present applicants are five individuals who at one time or another were engaged by
Combined Insurance Company of America (Combined) as insurance agents. In recent times, the
five have sued Combined in the Chief Industrial Magistrates’ Court of New South
Wales claiming entitlements both to annual leave and long service leave. One of the
principal issues to be resolved in those proceedings is the question of whether the agents
were employees of Combined, as they contend, or rather independent contractors, as
Combined contends. No doubt the resolution of that issue will involve a close
consideration of a broad range of indicia. One of the matters to which Combined points is
a term in its contract with each agent by which each agreed, or appears to have agreed,
that his relationship with Combined was not one of employment.</text>
</p>
</pgrp>
...
</bodytext>
</courtcase:opinion>
Example: NZ content
<case:judgmentbody>
<p>
<text>[After stating the facts, as above:] Section 127 (10) of the Act provides that no order
for the removal of any wholesale licence shall be made without the prior approval of the
Licensing Control Commission. On 22 March 1960 a formal order of the Licensing Control
Commission approving the removal was issued by the Commission. The Licensing Committee did not
itself hold any further meeting to consider the application made by Mrs Kettle for a removal
<page count="37" reporter="NZLR" text="[1961] NZLR 35 page "/>of the licence to the
Blackmore Street premises. On receipt of the approval by the Licensing Control Commission the
chairman and clerk of the Licensing Committee completed the endorsement upon the licence
required by s. 129 (2) of the Act. This was done on 31 March 1960. </text>
</p>
<p>
<text>A few days later Mrs Kettle lodged applications for temporary and permanent transfers of
the licence to Grogan and Blackmores Cordials Ltd. (the fourth defendant — hereinafter
referred to as "Grogan and Blackmores"). The temporary transfer was granted on 5
April 1960. </text>
</p>
</case:judgmentbody>
becomes
<courtcase:opinion>
<bodytext>
<p>
<text>[After stating the facts, as above:] Section 127 (10) of the Act provides that no order
for the removal of any wholesale licence shall be made without the prior approval of the
Licensing Control Commission. On 22 March 1960 a formal order of the Licensing Control
Commission approving the removal was issued by the Commission. The Licensing Committee did
not itself hold any further meeting to consider the application made by Mrs Kettle for a
removal <ref:page num="37" page-scheme="NZLR" page-scheme-type="reporter-abbreviation"/> of
the licence to the Blackmore Street premises. On receipt of the approval by the Licensing
Control Commission the chairman and clerk of the Licensing Committee completed the
endorsement upon the licence required by s. 129 (2) of the Act. This was done on 31 March
1960. </text>
</p>
<p>
<text>A few days later Mrs Kettle lodged applications for temporary and permanent transfers of
the licence to Grogan and Blackmores Cordials Ltd. (the fourth defendant —
hereinafter referred to as "Grogan and Blackmores"). The temporary transfer was
granted on 5 April 1960. </text>
</p>
</bodytext>
</courtcase:opinion>
Example: UK content
<case:judgment>
<case:judgmentbody>
<pgrp>
<p>
<pnum>1</pnum>
</p>
</pgrp>
<pgrp>
<p>
<text>“The applicant had been in the employ of the respondent company from 31st
August 1953, when he started as an apprentice, until his employment terminated on 4th May
1972. Over that period of time Mr Middlemass had worked in all sorts of capacities for the
company. However, the capacity about which we are concerned is that relating to either
sales manager or technical representative on behalf of the company.</text>
</p>
</pgrp>
</case:judgmentbody>
</case:judgment>
becomes
<courtcase:opinion>
<bodytext>
<pgrp>
<p>
<desig>1</desig>
</p>
</pgrp>
<pgrp>
<p>
<text>“The applicant had been in the employ of the respondent company from 31st
August 1953, when he started as an apprentice, until his employment terminated on 4th May
1972. Over that period of time Mr Middlemass had worked in all sorts of capacities for the
company. However, the capacity about which we are concerned is that relating to either
sales manager or technical representative on behalf of the company.</text>
</p>
</pgrp>
</bodytext>
</courtcase:opinion>
case:constituents becomes
courtcase:opinions/courtcase:representation with child
elements handled as described below.
Note: There can be multiple case:constituents elements at different
locations in a file (generally before and after the
case:judgment). These elements need to be maintained in the same
locations. The general rule remains that the content order should be maintained from
input to output.
Note: If person occurs inside
case:constituent, kindly refer to the instructions for
person in the General Markup section for guidance on
handling of this scenario.
Example: AU content
<case:constituents>
<case:constituent>
<emph typestyle="it">A Leopold SC</emph> and
<emph typestyle="it">T Saunders</emph> instructed by
<emph typestyle="it">Allens Arthur Robinson</emph> for the applicant (Combined Insurance Company of America t/as Combined Insurance Company of Australia).
</case:constituent>
</case:constituents>
becomes
<courtcase:representation>
<courtcase:counsel>
<emph typestyle="it">A Leopold SC</emph> and
<emph typestyle="it">T Saunders</emph> instructed by
<emph typestyle="it">Allens Arthur Robinson</emph> for the applicant (Combined Insurance Company of America t/as Combined Insurance Company of Australia).
</courtcase:counsel>
</courtcase:representation>
Example: NZ content
<case:constituents>
<case:constituent constituenttype="counsel">J. K. Patterson, for the plaintiffs.</case:constituent>
<case:constituent constituenttype="counsel">Tucker, for the first defendant.</case:constituent>
<case:constituent constituenttype="counsel">R. E. Wylie, for the second, third and fourth defendants.</case:constituent>
</case:constituents>
becomes
<courtcase:representation>
<courtcase:counsel>J. K. Patterson, for the plaintiffs.</courtcase:counsel>
<courtcase:counsel>Tucker, for the first defendant.</courtcase:counsel>
<courtcase:counsel>R. E. Wylie, for the second, third and fourth defendants.</courtcase:counsel>
</courtcase:representation>
Example: UK content
<case:constituents>
<case:constituent>
<person>
<name.text>P Shepherd for the Appellant</name.text>
</person>
</case:constituent>
<case:constituent>
<person>
<name.text>R Wood for the Respondents</name.text>
</person>
</case:constituent>
<case:constituent>
<person>
<name.text>Clyde & Co; Hill Dickinson</name.text>
</person>
</case:constituent>
</case:constituents>
becomes
<courtcase:opinions>
<courtcase:representation>
<courtcase:counsel>
<person:counselor>
<person:person>
<person:name.text>
P Shepherd for the Appellant
</person:name.text>
</person:person>
</person:counselor>
</courtcase:counsel>
<courtcase:counsel>
<person:counselor>
<person:person>
<person:name.text>
R Wood for the Respondents
</person:name.text>
</person:person>
</person:counselor>
</courtcase:counsel>
<courtcase:counsel>
<person:counselor>
<person:person>
<person:name.text>
Clyde & Co; Hill Dickinson
</person:name.text>
</person:person>
</person:counselor>
</courtcase:counsel>
</courtcase:representation>
</courtcase:opinions>
Any other elements under case:constituents should be
placed under
courtcase:opinions/courtcase:representation/courtcase:arguments/bodytext.
For example,
<case:constituents>
<p>
<text>Solicitors: Anderssen Lawyers for the Appellants; McInnes Wilson Lawyers for the Respondent; King & Co Solicitors for the Second to Twelfth Respondents. MGMW</text>
</p>
</case:constituents>
becomes
<courtcase:representation>
<courtcase:arguments>
<bodytext>
<p>
<text>Solicitors: Anderssen Lawyers for the Appellants; McInnes Wilson Lawyers for the Respondent; King & Co Solicitors for the Second to Twelfth Respondents. MGMW</text>
</p>
</bodytext>
</courtcase:arguments>
</courtcase:representation>
Example: UK content
<case:constituents>
<pgrp>
<p>
<text>The course of business was, to the knowledge of all the directors,
to supply agents with laudatory prospectuses and other documents,
mostly prepared by <emph typestyle="it">Feigan</emph>, to be used
for the purpose of inducing persons to take shares, and it is no
defence for a director to say that he allowed this to go on without
examining the papers to see whether they were honest or
fraudulent.</text>
</p>
<p>
<text>In <emph typestyle="it">Peek v. Gurney</emph> the House of Lords,
though they held that the bill must be dismissed because the
Plaintiff was not an original allottee of shares, yet expressed an
opinion that <emph typestyle="it">Barclay</emph>, one of the
directors of <emph typestyle="it">Overend, Gurney, & Co</emph>.,
was liable for the misrepresentations contained in a prospectus, in
the preparation and issuing of which he had taken no part, and which
he had never read. As against the company the Plaintiff is entitled,
upon the pleadings as they stand, to claim rescission of the
contract to take shares. But, if necessary, we ask leave to
amend</text>
</p>
<footnotegrp>
<footnote fntoken="0">
<fnbody>
<p>
<text>(1) Law Rep. 6 H. L. 377.</text>
</p>
</fnbody>
</footnote>
...
</footnotegrp>
...
</pgrp>
</case:constituents>
becomes
<courtcase:opinions>
<courtcase:representation>
<courtcase:arguments>
<bodytext>
<pgrp>
<p>
<text>The course of business was, to the knowledge of all the directors,
to supply agents with laudatory prospectuses and other documents,
mostly prepared by <emph typestyle="it">Feigan</emph>, to be used
for the purpose of inducing persons to take shares, and it is no
defence for a director to say that he allowed this to go on without
examining the papers to see whether they were honest or
fraudulent.</text>
</p>
<p>
<text>In <emph typestyle="it">Peek v. Gurney</emph> the House of Lords,
though they held that the bill must be dismissed because the
Plaintiff was not an original allottee of shares, yet expressed an
opinion that <emph typestyle="it">Barclay</emph>, one of the
directors of <emph typestyle="it">Overend, Gurney, & Co</emph>.,
was liable for the misrepresentations contained in a prospectus, in
the preparation and issuing of which he had taken no part, and which
he had never read. As against the company the Plaintiff is entitled,
upon the pleadings as they stand, to claim rescission of the
contract to take shares. But, if necessary, we ask leave to
amend</text>
</p>
<p>
<text>
<footnotegroup>
<footnote>
<ref:anchor id="_1234"/>
<bodytext>
<p>
<text>(1) Law Rep. 6 H. L. 377.</text>
</p>
</bodytext>
</footnote>
...
</footnotegroup>
</text>
</p>
...
</pgrp>
</bodytext>
</courtcase:arguments>
</courtcase:representation>
</courtcase:opinions>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_caselaw\Rosetta_case.constituents-LxAdv_courtcase.opinions_courtcase.representation.dita
Original Target XPath: courtcase:opinions/courtcase:representation
<prelim>
<pgrp>
<p>
<text>3. The factual background to the three claims is set out in
[17]–[29], below. The issues raised on this application are
described in detail in [30], below. The admissibility and value of
statements contained in witness statements made by officials is
considered in [32]–[36], below. The admissibility and
significance of the report of the Parliamentary Joint Committee on
Human Rights on the new regime is discussed in [37], below.
Paragraphs [38] and [39], below, explain why it is the current
effect of the new regime which has to be considered rather than when
it was enacted.</text>
</p>
</pgrp>
</prelim>
becomes
<courtcase:prelim>
<bodytext>
<pgrp>
<p>
<text>3. The factual background to the three claims is set out in
[17]–[29], below. The issues raised on this application are
described in detail in [30], below. The admissibility and value of
statements contained in witness statements made by officials is
considered in [32]–[36], below. The admissibility and
significance of the report of the Parliamentary Joint Committee on
Human Rights on the new regime is discussed in [37], below.
Paragraphs [38] and [39], below, explain why it is the current
effect of the new regime which has to be considered rather than when
it was enacted.</text>
</p>
</pgrp>
</bodytext>
</courtcase:prelim>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_caselaw\Rosetta_prelim-LxAdv_courtcase.prelim.dita
Namespace
No namespace
Match
prelim
Mode
#default
Import precedence
0
Source
<xsl:template match="prelim"><!-- Original Target XPath: courtcase:prelim --><courtcase:prelim><bodytext><xsl:apply-templates select="@* | node()"/></bodytext></courtcase:prelim></xsl:template>
Template
case:order
Documentation
Description
<case:order subdoc="true" toc-caption="Orders">
<heading>
<title>Orders</title>
</heading>
<l>
<li>
<lilabel><emph typestyle="ro">(1)</emph></lilabel>
<p>
<text>The plaintiffs’ application is dismissed.</text>
</p>
</li>
<li>
<lilabel><emph typestyle="ro">(2)</emph></lilabel>
<p>
<text>The plaintiffs pay the defendant’s costs, including each appearance in the court, as taxed, if not agreed.</text>
</p>
</li>
</l>
</case:order>
becomes
<courtcase:orders>
<courtcase:order includeintoc="true" alternatetoccaption="Orders">
<heading>
<title>Orders</title>
</heading>
<bodytext>
<list>
<listitem>
<label><emph typestyle="ro">(1)</emph></label>
<bodytext>
<p>
<text>The plaintiffs’ application is dismissed.</text>
</p>
</bodytext>
</listitem>
<listitem>
<label><emph typestyle="ro">(2)</emph></label>
<bodytext>
<p>
<text>The plaintiffs pay the defendant’s costs, including each appearance in the court, as taxed, if not agreed.</text>
</p>
</bodytext>
</listitem>
</list>
</bodytext>
</courtcase:order>
</courtcase:orders>
<case:judgments>
...
<case:appendix>
<p>
<text>Attached is a copy of the relevant portion of the judgment of the Supreme<nl/>Court Equity Division in
<ci:cite searchtype="CASE-REF">
<ci:content>
<citefragment searchtype="CASE-NAME-REF"><emph typestyle="it">Massoud v NRMA Insurance Ltd</emph></citefragment>
</ci:content>
</ci:cite> referred to at 655
<ci:cite searchtype="CASE-REF">
<ci:case>
<ci:caseinfo>
<ci:decisiondate year="2005"/>
</ci:caseinfo>
<ci:caseref ID="cr002">
<ci:reporter value="nswlr"/>
<ci:volume num="62"/>
<ci:page num="653"/>
</ci:caseref>
<ci:caseref anaphref="cr002" spanref="cr002-01">
<ci:pinpoint targettype="para" num="7"/>
</ci:caseref>
</ci:case>
<ci:content>
<citefragment searchtype="CASE-CITE-REF">
<ci:span spanid="cr002-01">[7]</ci:span>
</citefragment>
</ci:content>
</ci:cite>.
</text>
</p>
</case:appendix>
</case:judgments>
becomes
<courtcase:opinions>
...
<attachments>
<appendix>
<bodytext>
<p>
<text>Attached is a copy of the relevant portion of the judgment of the Supreme<proc:nl/>Court Equity Division in
<lnci:cite type="case">
<lnci:content>
<emph typestyle="it">Massoud v NRMA Insurance Ltd</emph>
</lnci:content>
</lnci:cite> referred to at 655
<lnci:cite>
<lnci:case>
<lnci:caseinfo>
<lnci:decisiondate year="2005"/>
</lnci:caseinfo>
<lnci:caseref ID="cr002">
<lnci:reporter value="nswlr"/>
<lnci:volume num="62"/>
<lnci:page num="653"/>
</lnci:caseref>
<lnci:caseref anaphref="cr002">
<lnci:pinpoint targettype="para" num="7"/>
</lnci:caseref>
</lnci:case>
<lnci:content>[7]</lnci:content>
</lnci:cite>.
</text>
</p>
</bodytext>
</appendix>
</attachments>
</courtcase:opinions>
If case:embeddedcase occurs within
case:appendix then conversion need to handle
courtcase:caseexcerpt by using
bodytext under appendix i.e,
case:appendix/case:embeddedcase becomes
attachments/appendix/bodytext/courtcase:caseexcerpt
When sigblock is a child of case:appendix then case:appendix/sigblock/p/text/person/name.text becomes attachments/appendix/bodytext/note/byline/person:person/person:name.text.
2013-11-12: Added Instruction and example when sigblock is a child of case:appendix: Webstar #: 5093906. This change immediately applies to AU01 Caselaw.
2012-08-23: Modified example to use an underscore instead of the two digit country
code for xml:id.
docinfo becomes doc:metadata/doc:docinfo.
docinfo:dpsi[@id-string], docinfo[@browseprev],
docinfo[@browsenext], docinfo[@partitionnum],
docinfo[@majorrevision], and docinfo[@excludefromalerts]
become doc:metadata/doc:docinfo/doc:legacy-metadata with attribute
doc:legacy-metadata[@metadatasource="lbu-meta"] with child elements:
Create meta and metaitem with attributes
@name and @value.
If document also contains an element docinfo:lbu-meta with child elements
that are not explicitly dropped, include each metaitem after all of the docinfo
attributes are placed here. See Example docinfo and
docinfo:lbu-meta below.
The element dc:metadata is the first required child element of
doc:metadata/doc:docinfo. As such, dc:metadata should be
created immediately after creating doc:metadata/doc:docinfo.
Note:
In addition, as part of workflow processing , ICCE will provide LNI values for each
document. This PCDATA
value will be mapped to the following:
dc:identifier[@lnmeta:identifier-scheme="LNI"]
dc:identifier[@lnmeta:identifier-scheme="PGUID"]
The LNI value for dc:identifier[@lnmeta:identifier-scheme="PGUID"]will include the
"urn:contentItem" namespace prefix.
Create dc:date[@lnmeta:datetype="conversion-date"]. This element will contain the
date the output file was created during conversion.
Note: The format of the content of all dc:date elements must be in
'YYYY-MM-DD'.
*****************************************************************************
this template uses a global $dpsi parameter that should be placed in the
stream driver file as:
<xsl:param name="dpsi" as="xs:string" select=" 'From LBU Manifest File' "/>
this parameter can be used in any module in your stream. Do not add
it as a variable or parameter in this file to avoid conflicts.
*******************************************************************************
<xsl:variable name="dpsi"/>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo-LxAdv-doc.metadata_doc.docinfo.dita
CSN: Created docinfo and children from base.xsl
this template processes all the content that goes into doc:docinfo.
<xsl:template name="perjudge"><!-- JD: 2017-07-14: added 'judge'; probably a data error from UK XSLT development --><xsl:if test="//person[@searchtype = ('JUDGES','judge')]"><metaitem name="JUDGES" value="{//person[ @searchtype = ('JUDGES','judge') ]/name.text}"/></xsl:if></xsl:template>
<xsl:template name="findDPSI"><xsl:choose><!-- **************************************************************
Vikas Rohilla : Commented this part because findDPSI templete called in the docinfo
template and after using the double dot (..) current element becomes
the CASEDOC and the docinfo:lbu-meta never find in the CASEDOC.
and after match the conversion is skip becauese it is created by the
docinfo:metaitem template.
**************************************************************--><!-- <xsl:when test="../docinfo:lbu-meta/docinfo:metaitem[@name='DPSI']">
<metaitem xmlns="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/">
<xsl:attribute name="name">dpsi</xsl:attribute>
<xsl:attribute name="value" select="../docinfo:lbu-meta/docinfo:metaitem[@name='DPSI']/@value"/>
</metaitem>
</xsl:when>--><!-- Vikas Rohilla : replaced double dot(..) with the single dot (.) --><xsl:when test="./docinfo:lbu-meta/docinfo:metaitem[upper-case(@name) = 'DPSI']"/><xsl:otherwise><metaitem><xsl:attribute name="name">dpsi</xsl:attribute><xsl:attribute name="value" select="$dpsi"/></metaitem></xsl:otherwise></xsl:choose></xsl:template>
docinfo:alt-renditions/docinfo:alt-rendition to
doc:alt-renditions/doc:alt-rendition
id-CCCC-10283
Instructions [common element]
This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
docinfo:alt-renditions becomes
doc:alt-renditions with these children:
docinfo:alt-renditions/docinfo:alt-rendition becomes
doc:alt-renditions/doc:alt-rendition with
@key and child as follows:
docinfo:alt-renditions/docinfo:alt-rendition/link
becomes
doc:alt-renditions/doc:alt-rendition/ref:lnlink[@service="ATTACHMENT"].
For conversion of link, please see
the topic "link to
ref.lnlink/@service="ATTACHMENT"".
docinfo:alt-renditions/docinfo:alt-rendition/lnlink
becomes
doc:alt-renditions/doc:alt-rendition/ref:lnlink[@service="ATTACHMENT"].
For conversion of lnlink, please
see the topic .
For UK06 Laws/Acts/Bills/Measures and UK07 Regulation place the text of
leg:officialname in
doc:alt-renditions/doc:alt-rendition/ref:lnlink/ref:marker
instead of the source text as used within
docinfo:alt-renditions/docinfo:alt-rendition/link
Source XML 1
<docinfo:alt-renditions>
<docinfo:alt-rendition key="fulltext">
<link alttext="pdf version" filename="VIC_ACT_1998-25.pdf" type="pdf">PDF version of this Act</link>
</docinfo:alt-rendition>
</docinfo:alt-renditions>
Target XML 1
<doc:alt-renditions>
<doc:alt-rendition key="fulltext">
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">PDF version of this Act</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="X-Y-VIC-ACT-1998-25"/>
<!-\- X and Y are LNI and SMI values obtained from CSSM -\->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value=""/>
<!-\- @value populated with SMI obtained from CSSM -\->
<!-\- This @value assignment is done by conversion program -\->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:alt-rendition>
</doc:alt-renditions>
Source XML 2
<docinfo:alt-renditions>
<docinfo:alt-rendition key="fulltext">
<link alttext="pdf version" filename="VIC_ACT_1998-25.pdf" type="pdf">PDF version of this Act</link>
</docinfo:alt-rendition>
</docinfo:alt-renditions>
<!-\- ETC. -\->
<leg:officialname><emph typestyle="bf">Commons Act 1236</emph></leg:officialname>
Target XML 2
<legisinfo:officialtitle>Commons Act 1236</legisinfo:officialtitle>
<!-\- ETC. -\->
<doc:alt-renditions>
<doc:alt-rendition key="fulltext">
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">Commons Act 1236</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="X-Y-VIC-ACT-1998-25"/>
<!-\- X and Y are LNI and SMI values obtained from CSSM -\->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value=""/>
<!-\- @value populated with SMI obtained from CSSM -\->
<!-\- This @value assignment is done by conversion program -\->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:alt-rendition>
</doc:alt-renditions>
Source XML 3
<docinfo:alt-renditions>
<docinfo:alt-rendition key="fulltext">
<lnlink service="ATTACHMENT" status="valid">
<marker role="content">PDF Format</marker>
<api-params>
<param name="attachment-key" value="application_for_apportionment-xxxx-xxxx-xxxxx-xx"/>
<param name="attachment-type" value="pdf"/>
<param name="attachment-smi" value="4364"/>
<param name="componentseq" value="1"/>
</api-params>
</lnlink>
</docinfo:alt-rendition>
</docinfo:alt-renditions>
Target XML 3
<doc:alt-renditions>
<doc:alt-rendition key="fulltext">
<ref:lnlink service="ATTACHMENT">
<ref:marker role="content">PDF Format</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="application_for_apportionment-xxxx-xxxx-xxxxx-xx"/>
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value="4364"/>
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:alt-rendition>
</doc:alt-renditions>
Changes
2016-07-29: Added Note about xml snippets that illustrate
image handling. Note summarizes move from Apollo to Blobstore application. UK is
first LBU to move to Blobstore.
2013-12-17: Added instruction and example for
docinfo:alt-rendition/lnlink. (Webteam
#247307)
2013-05-01: Updated instructions and target example per
latest Apollo markup.
2013-02-26: Updated target example per project
requirement.
2012-10-29: Added instruction and example for UK06
Laws/Acts/Bills/Measures and UK07 Regulation place the text of
leg:officialname in
doc:alt-renditions/doc:alt-rendition/ref:lnlink/ref:marker
(Webteam #243521)
2012-10-26: Changed to reflect recent requirements for attachment-type links.
2012-09-06: Created.
Vikas Rohilla : Template to match docinfo:alt-renditions and create doc:alt-renditions
Note: This topic is used in numerous conversion instructions for several LBUs. It is a shared
topic rather than duplicated to ensure consistency and accuracy. The xml snippets
contained
in this topic reflect markup needed for the Apollo image handling application. The
UK is the
first LBU to move from Apollo to the Blobstore application for image handling. Therefore,
if
this is a UK conversion instruction document, please refer to the following topics
for
correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE images
(id-CCCC-10542)
inlineobject to ref:inlineobject for
BLOBSTORE images (id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE images
(id-CCCC-10541)
docinfo:assoc-links becomes
doc:related-content. Attribute
@assoc-content is suppressed.
docinfo:assoc-links-grp becomes
doc:related-content-grp, and its descendents are processed as
follows:
If present, docinfo:assoc-resource becomes
ref:relatedresourceref/ref:relatedresourceid. Copy the value of
@assoc-resourceid to
@ref:resourcekey
The target value of doc:related-content-grp/@grptype depends on
the existing attrribute in the source:
If docinfo:assoc-links-grp/@assoc-content exists, it
becomes @grptype.
The children below may occur within either level,
docinfo:assoc-links or
docinfo:assoc-links-grp, and convert as follows:
With one exception, text becomes
doc:related-content-item/doc:related-content-desc/p/text. The
exception to this rule is if and only if the only children of
text are one or more link elements; in
this case see the rule for link below and example #4.
link becomes
doc:related-content-item/doc:related-content-link/ref:lnlink[@service="ATTACHMENT"].
In addtion to this conversion being performed if the link
element is a child of docinfo:assoc-links or
docinfo:assoc-links-grp, it is also done when the only
children of text are one or more
linkelements. That is, if and only if all of a
text/link element's other siblings are also
link elements. In the text scenario,
the start-tag and end-tag (but not the content) of text are
dropped (see example #4). If there are multiple link elements,
then multiple doc:related-content-item and children are
created, one for each link element.
For details about converting link to
ref:lnlink[@service="ATTACHMENT"] see
link rules in the General Markup section.
remotelink[@service="QUERY"] is suppressed. If nothing else is
present then also suppress the parent.
Note:
This Note is applicable to CA03, and
CA05-CA08 only If we have XPath
docinfo:assoc-links-grp/remotelink[@service="QUERY"] or
docinfo:assoc-links/remotelink[@service="QUERY"]then we
don't need to suppress it from target but in certain condition for that
stream-wise.
For CA06 and CA07 If document is having
remotelink[@service="QUERY"] under the
docinfo:assoc-links-grp[assoc-content="enabling"] and
remotelink comes with attributes
@remotekey1 with the start value "DOCINFO(XXXX)"
and @remotekey2 comes with value All Canadian
Statutes then it should be mapped with
doc:related-content/doc:related-content-grp/doc:related-content-item[@content-type="enablingLeg"]/ref:relatedresourceref/ref:relatedresourceid/ref:resourcekey="urn:leg-id-1:XXXX"
where XXXX will be taken from source attribute
remotekey1 Refer Example 7.
For CA05 and CA08 If document is having
remotelink[@service="QUERY"] under the
docinfo:assoc-links or
docinfo:assoc-links-grp and
remotelink comes with attributes
@remotekey2="All Canadian Regulations" then it should be
mapped with
doc:related-content/doc:related-content-grp[@grptype="subordinateLeg"]/doc:related-content-item[@content-type="subordinateLeg"]/ref:relatedresourceref/ref:relatedresourceid/ref:resourcekey="urn:leg-id-1:XXXX"
where XXXX will be taken from source attribute
remotekey1 Refer Example 8.
For CA05 - CA08 Conversion Needs to split multiple ORs into a
separate doc:related-content-item. Refer Example 9
for CA06-CA07 streams.
For CA06 and CA07docinfo:assoc-links-grp/@assoc-content="enabling" should
map with doc:related-content-grp/@grptype="enablingLeg".
Any heading found inside
"docinfo:assoc-links-grp/remotelink" then it should be
mapped with @doc:related-content-grp/heading/title. Refer
Example 9.
For CA03 If document is having
remotelink[@service="QUERY"] and
remotelink comes with attributes
@remotekey1 with the value "REFNUM(XXXX)" and
@remotekey2 contains "All Canadian Summaries" then
it should be mapped with
doc:related-content/doc:related-content-grp/doc:related-content-item[@content-type="caseSummaries"]/ref:relatedresourceref/ref:relatedresourceid/ref:resourcekey="urn:ucn-1:XXXX"
where XXXX will be taken from source attribute
remotekey1. Any bilingual headings should be retained
along with their associated @xml:lang. Refer Example 10.
remotelink[@service="DOC-ID"] becomes
doc:related-content-item/doc:related-content-link/ref:lnlink[@service="DOCUMENT"].
If the parent docinfo:assoc-links contains
@assoc-content="external-content-location", then add
@content-type="external-content-location"] to
doc:related-content-item. Create the following child elements:
Create ref:marker to capture the PCDATA of
remotelink.
Create ref:locator and populate it as follows:
Create ref:locator-key and populate it as follows:
If @remotekey1="DOC-ID" then
ref:key-name/@name will have the value
"DOC-ID".
key-value/@value will be the value of
@dpsi followed by hyphen and concatenated with
@refpt or @remotekey2,
which ever is present (if both are present, use
@remotekey2).
If @remotekey1="REFPTID" then
ref:key-name/@name will have the value
"DOC-ID".
ref:key-value/@value will be the value of
@dpsi followed by hyphen and concatenated with
@docidref.
Create ref:locator/@anchoridref with value from
@refpt or @remotekey2,
which ever is present (if both are present, use
@refpt).
Note: If remotelink/@dpsi is not present, use value from
docinfo:dpsi/@id-string or capture value from the LBU
manifest file.
Note: ref:locator/@anchoridref that begins with a number must
have an underscore added at start. Also apply other identifier data type format as
used for xml:id and ref:anchor/@id
(e.g. change colon to underscore). Refer to the section titled "Identifiers to ID
Data Type -
Handling Pattern Restrictions", if that section exists in this CI.
remotelink[@href] becomes
doc:related-content-item/doc:related-content-link/ref:lnlink[@service="URL"].
If the parent docinfo:assoc-links contains
@assoc-content="external-content-location", then add
@content-type="external-content-location"] to
doc:related-content-item.
For details on converting
remotelink[@href] to ref:lnlink see
remotelink rules in General Markup section.
lnlink[@service="QUERYLINK"] becomes
doc:related-content-item/doc:related-content-link/ref:lnlink
which is populated as follows:
lnlink/api-params becomes
ref:locator/ref:locator-params, and the children are
mapped as follows:
For each api-params/param element, create a
corresponding proc:param and populate the
attributes:
param/@name becomes
proc:param/@name
param/@value becomes
proc:param/@value
lnlink[@service="ATTACHMENT"] becomes
doc:related-content-item/doc:related-content-link/ref:lnlink
which is populated as follows: See example 6 for more clarification.
Note: Conversion final output will be
ref:key-value/@value="{LNI}-{SMI}-{X}" where as
{X} is the lnlink/api-params/param/@value as
described above and prepend {LNI} and {SMI} are not literal values, they
show where the LNI and SMI values obtained from CSSM should be output.
See the Example 6
lnlink/api-params becomes
ref:locator/ref:locator-params, and the children are
mapped as follows:
For each api-params/param element, create a
corresponding proc:param and populate the
attributes:
param/@name becomes
proc:param/@name
param/@value becomes
proc:param/@value
Note: Also create the below markup in the target document while
conversion
proc:param/@name="attachment-smi" and
proc:param/@value="{SMI}"
Note: @value populated with SMI obtained from CSSM. This @value
assignment is done by conversion program
lnlink[@service="TRAVERSE"] becomes
doc:related-content-item/doc:related-content-link/ref:lnlink[@service="TRAVERSE"].
If the parent docinfo:assoc-links contains
@assoc-content="external-content-location", then add
@content-type="external-content-location"] to
doc:related-content-item.
For details on converting lnlink[@service="TRAVERSE"] to
ref:lnlink[@service="TRAVERSE"] see
lnlink[@service="TRAVERSE"] rules in General Markup
section.
lnlink[@service="URL"] becomes
doc:related-content-item/doc:related-content-link/ref:lnlink[@service="URL"].
If the parent docinfo:assoc-links contains
@assoc-content="external-content-location", then add
@content-type="external-content-location"] to
doc:related-content-item.
For details on converting lnlink[@service="URL"] to
ref:lnlink[@service="URL"] see
lnlink[@service="URL"] rules in General Markup section.
ci:cite becomes
doc:related-content-item/doc:related-content-link/ref:lnlink[@service="TRAVERSE"].
If the parent docinfo:assoc-links contains
@assoc-content="external-content-location", then add
@content-type="external-content-location"] to
doc:related-content-item. Create the following child elements:
Create ref:marker to capture the PCDATA of
ci:cite/ci:content.
ref:locator/ref:locator-key/ref:key-name/@name will have
the value "normcite".
ref:locator/ref:locator-key/key-value/@value will be the
value of ci:cite/ci:content.
Create
ref:locator/ref:locator-params/proc:param[@name="normprotocol"].
If ci:cite/@normprotocol is present, create the attribute
proc:param/@value and copy the value of
normprotocol; otherwise, add
@value="lexsee". This line is hard coded.
If docinfo:doc-country/@iso-cc exists, create
ref:locator/ref:locator-params/proc:param[@name="countrycode"]
with the attribute @value. The @value
value is from docinfo:doc-country/@iso-cc.
Source XML 1
<docinfo:assoc-links>
<remotelink alttext="Find related journals" cmd="f:exp" remotekey1="LEG-REF(Flood and Water Management Act 2010 OR FWMA 2010 w/3 s 48 OR ss 48 OR section 48 OR sections 48) OR "Flood and Water Management Act 2010" OR FWMA 2010 w/3 LEG-REF(s 48 OR ss 48 OR section 48 OR sections 48)" remotekey2="All Subscribed Journals Sources" service="QUERY">Find related journals</remotelink>
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="786617_SL" dpsi="02o0" docidref="ABC123">Find related subordinate legislation</remotelink>
</docinfo:assoc-links>
<docinfo:assoc-links>
<remotelink alttext="Latest Times Law Reports" href="www.timesonline.co.uk/TGD/lexisDisplay/0,,,00.html" hrefclass="http">Latest Times Law Reports</remotelink>
<ci:cite searchtype="BOOK-REF">
<ci:content>Data technologies and patents (2012) 18 MCN 5</ci:content>
</ci:cite>
</docinfo:assoc-links>
Source XML 4, showing a text element containing only a
link child element
<docinfo:assoc-links-grp assoc-content="related-documents">
<heading>
<title>Related documents</title>
</heading>
<remotelink service="DOC-ID" remotekey1="REFPTID" newwindow="YES" refpt="0OLB_258264"
dpsi="0OLB" status="invalid" docidref="e60348a7-cc9b-4d43-468b-55a207cd7f00">Serving the claim form—method, address, deemed service and dispensing with service</remotelink>
<text searchtype="figure">
<link filename="EXT_DR_List of authorised government departments for service.pdf"
alttext="EXT_DR_List of authorised government departments for service.pdf" type="pdf"
>List of authorised government departments for service</link>
</text>
</docinfo:assoc-links-grp>
</docinfo:assoc-links>
Target XML 4
<doc:related-content>
<doc:related-content-grp grptype="related-documents">
<heading>
<title>Related documents</title>
</heading>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="DOCUMENT">
<ref:marker>Serving the claim form—method, address, deemed service and
dispensing with service</ref:marker>
<ref:locator anchoridref="0OLB_258264">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="0OLB-e60348a7-cc9b-4d43-468b-55a207cd7f00"/>
</ref:locator-key>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">List of authorised government departments for service</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="{LNI}-{SMI}-EXT_DR_List of authorised government departments for service"/>
<!--
The {LNI} and {SMI} are not literal values,
they show where the LNI and SMI values
obtained from CSSM should be output.
-->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value=""/>
<!-- proc:param/@value is set to the SMI value obtained from CSSM. -->
<!-- This @value assignment is done by the conversion program. -->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
</doc:related-content-grp>
</doc:related-content>
<doc:related-content-grp grptype="related-documents">
<heading>
<title>Related documents</title>
</heading>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">See PDF rendition</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="{LNI}-{SMI}-RSCS_14905_CURRENT-0001"/>
<!--
The {LNI} and {SMI} are not literal values,
they show where the LNI and SMI values
obtained from CSSM should be output.
-->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value="{SMI}"/>
<!-- proc:param/@value is set to the SMI value obtained from CSSM. -->
<!-- This @value assignment is done by the conversion program. -->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
</doc:related-content-grp>
Source XML 7 - CA06-CA07
docinfo:assoc-links-grp/remotelink[@service="QUERY"]
Source XML 8 - CA05
docinfo:assoc-links/remotelink[@service="QUERY"]
<docinfo:assoc-links>
<remotelink remotekey1="DOCINFO(5eff46c7fc603910e15eb944d97c13c0)"
remotekey2="All Canadian Regulations" service="QUERY">Link to regulations enabled by this
act</remotelink>
</docinfo:assoc-links>
Target XML 8 - CA05
docinfo:assoc-links/remotelink[@service="QUERY"]
<docinfo:assoc-links>
<docinfo:assoc-links-grp assoc-content="enabling">
<heading/>
<remotelink
remotekey1="DOCINFO(2ccc2826b445aebac6f6b3f8013e7931)
OR DOCINFO(2ccc2826b445aebac6f6b3f8013e7932)
OR DOCINFO(2ccc2826b445aebac6f6b3f8013e7933)
....
OR DOCINFO(2ccc2826b445aebac6f6b3f8013e7939)"
remotekey2="All Canadian Statutes" service="QUERY">Enabling Act</remotelink>
</docinfo:assoc-links-grp>
</docinfo:assoc-links>
<docinfo:assoc-links>
<docinfo:assoc-links-grp assoc-content="related-documents" content-type="form">
<docinfo:assoc-resource assoc-resourcename="BusLaw" assoc-resourceid="urn:krm:ABCDEABCDEABCDEABCDEABCDE3ABCDE1"/>
<lnlink service="TRAVERSE">
<key-name name="normcite"/>
<key-value value="LexisNexis Forms Form 219-8.22-7"/>
<marker role="label">Notice of Commencement Of Case Under Chapter 11 of the Bankruptcy Code, Meeting of Creditors, and Deadlines--Chapter 11 Corporation/Partnership Case; Official Form 9F </marker>
</lnlink>
<remotelink dpsi="0N5M" remotekey1="DOC-ID" remotekey2="0N5M_157408" service="DOC-ID">Exhibit A to Official Form 1</remotelink>
<remotelink href="http://www.justice.gov/ust/index.htm" newwindow="YES" service="SEARCH" status="valid">Official Website of the U.S. Trustee Program</remotelink>
</docinfo:assoc-links-grp>
<docinfo:assoc-links-grp assoc-content="related-documents" content-type="case">
<docinfo:assoc-resource assoc-resourcename="IP" assoc-resourceid="urn:krm:ABCDEABCDEABCDEABCDEABCDE3ABCDE2"/>
<lnlink service="TRAVERSE">
<key-name name="normcite"/>
<key-value value="2012 U.S. Bankr. Ct. Motions LEXIS 1246"/>
<marker role="label">2012 U.S. Bankr. Ct. Motions LEXIS 1246 (Bankr. N.D. Ill.)</marker>
</lnlink>
<remotelink dpsi="0N5N" remotekey1="DOC-ID" remotekey2="0N5N-0N5N_157355" service="DOC-ID">Emergency Motion for Joint Administration of Chapter 11 Cases</remotelink>
<remotelink href="http://www.uscourts.gov/RulesAndPolicies/FederalRulemaking/LocalCourtRules/USBankruptcyCourts.htm" newwindow="YES" service="SEARCH" status="valid">Official Website of the Federal Judiciary</remotelink>
</docinfo:assoc-links-grp>
</docinfo:assoc-links>
Target XML 11 (LPA)
<doc:related-content>
<doc:related-content-grp grptype="related-documents">
<ref:relatedresourceref>
<ref:relatedresourceid ref:resourcekey="urn:krm:ABCDEABCDEABCDEABCDEABCDE3ABCDE1"/>
</ref:relatedresourceref>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="TRAVERSE">
<ref:marker role="label">Notice of Commencement Of Case Under Chapter 11 of the Bankruptcy Code, Meeting of Creditors, and Deadlines--Chapter 11 Corporation/Partnership Case; Official Form 9F </ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="normcite"/>
<ref:key-value value="LexisNexis Forms Form 219-8.22-7"/>
</ref:locator-key>
<ref:locator-params>
<proc:param name="normprotocol" value="lexsee"/>
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="DOCUMENT">
<ref:marker>Exhibit A to Official Form 1</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="0N5M-0N5M_157408"/>
</ref:locator-key>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="URL">
<ref:marker>Official Website of the U.S. Trustee Program</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="URL"/>
<ref:key-value value="http://www.justice.gov/ust/index.htm"/>
</ref:locator-key>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
</doc:related-content-grp>
<doc:related-content-grp grptype="related-documents">
<ref:relatedresourceref>
<ref:relatedresourceid ref:resourcekey="urn:krm:ABCDEABCDEABCDEABCDEABCDE3ABCDE2"/>
</ref:relatedresourceref>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="TRAVERSE">
<ref:marker role="label">2012 U.S. Bankr. Ct. Motions LEXIS 1246 (Bankr. N.D. Ill.)</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="normcite"/>
<ref:key-value value="2012 U.S. Bankr. Ct. Motions LEXIS 1246"/>
</ref:locator-key>
<ref:locator-params>
<proc:param name="normprotocol" value="lexsee"/>
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="DOCUMENT">
<ref:marker>Emergency Motion for Joint Administration of Chapter 11 Cases</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="0N5N-0N5N_157355"/>
</ref:locator-key>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
<doc:related-content-item>
<doc:related-content-link>
<ref:lnlink service="URL">
<ref:marker>Official Website of the Federal Judiciary</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="URL"/>
<ref:key-value value="http://www.uscourts.gov/RulesAndPolicies/FederalRulemaking/LocalCourtRules/USBankruptcyCourts.htm"/>
</ref:locator-key>
</ref:locator>
</ref:lnlink>
</doc:related-content-link>
</doc:related-content-item>
</doc:related-content-grp>
</doc:related-content>
Description
rosetta element: docinfo:assoc-links related content
<xsl:template match="docinfo:assoc-links-grp"><doc:related-content-grp><xsl:apply-templates select="@* | node()"/><!-- Awantika-2017-10-13: creating empty doc:related-content-item which is required child element for docinfo:assoc-links-grp
Input data is coming with empty text the module created for docinfo:assoc-links-grp/text is not recognising the empty text and therefore
making the file invalid--><!-- 2017-10-24 - MDS: Added 'UK11DA' streamID to test. --><xsl:if test="$streamID=('UK11DN' , 'UK11DA') and child::text[not(preceding-sibling::* except heading and following-sibling::*)]=''"><doc:related-content-item/></xsl:if><xsl:if test="$streamID=('CA05' , 'CA06') and child::remotelink[@service='QUERY'][not(following-sibling::* and preceding-sibling::heading='')]"><doc:related-content-item/></xsl:if></doc:related-content-grp></xsl:template>
<xsl:template match="docinfo:assoc-links-grp/@assoc-content"><xsl:attribute name="grptype"><xsl:choose><xsl:when test="(starts-with($streamID,'CA06') or starts-with($streamID ,'CA07')) and .='enabling' and parent::docinfo:assoc-links-grp/remotelink[@service='QUERY'][starts-with(@remotekey1 , 'DOCINFO(')][@remotekey2[.='All Canadian Statutes']]"><xsl:text>enablingLeg</xsl:text></xsl:when><xsl:when test="(starts-with($streamID , 'CA05') or starts-with($streamID , 'CA08')) and parent::docinfo:assoc-links-grp/remotelink[@service='QUERY'][starts-with(@remotekey1 , 'DOCINFO(')][@remotekey2[.='All Canadian Regulations']]"><xsl:text>subordinateLeg</xsl:text></xsl:when><xsl:when test="starts-with($streamID , 'CA03') and parent::docinfo:assoc-links-grp/remotelink[@service='QUERY'][starts-with(@remotekey1 , 'REFNUM(')][@remotekey2='All Canadian Summaries']"><xsl:text>caseSummaries</xsl:text></xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose></xsl:attribute></xsl:template>
<xsl:template match="docinfo:assoc-links/text | docinfo:assoc-links-grp/text"><!-- BRT 12/12/17 backed out code to normalize the text --><!-- BRT 11/27/17 added processing to normlize the space in text nodes to avoid false positives --><!-- xsl:variable name="text">
<xsl:for-each select="text()">
<xsl:value-of select="normalize-space(.)"/>
</xsl:for-each>
</xsl:variable--><xsl:choose><!-- BRT 12/12/17 backed out change: 'and not(text())' to and $text =''" --><!-- BRT change 'and not(text())' to and $text =''" --><xsl:when test="child::link and not(child::*[not(self::link)]) and not(text())"><xsl:apply-templates select="link"/></xsl:when><!-- Awantika: remotelink[@service="DOC-ID"] becomes doc:related-content-item/doc:related-content-link/
ref:lnlink[@service="DOCUMENT"]. Added this for UK11DN --><xsl:when test="(./remotelink or ./url/remotelink)and $streamID=('UK11DN','UK11DA')"><xsl:apply-templates select="@* | node()"/></xsl:when><!-- Priya Kaushal: Added below code for UK 15 --><xsl:when test="(./remotelink or ./url/remotelink) and $streamID=('UK15')"><doc:related-content-item><doc:related-content-desc><p><text><xsl:apply-templates select="remotelink | url/remotelink"/></text></p></doc:related-content-desc></doc:related-content-item></xsl:when><!-- Awantika: when condition for UK11DN --><xsl:when test="$streamID='UK11DN' and child::link"><xsl:apply-templates select="node() except emph"/></xsl:when><xsl:otherwise><doc:related-content-item><doc:related-content-desc><p><text><xsl:apply-templates select="@* | node()"/></text></p></doc:related-content-desc></doc:related-content-item></xsl:otherwise></xsl:choose></xsl:template>
Template
link[parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp or parent::text[parent::docinfo:assoc-links
or parent::docinfo:assoc-links-grp]]
Namespace
No namespace
Match
link[parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp or parent::text[parent::docinfo:assoc-links
or parent::docinfo:assoc-links-grp]]
<xsl:template match="link[parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp or parent::text[parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp]]"><doc:related-content-item><doc:related-content-link><ref:lnlink service="ATTACHMENT"><ref:marker><xsl:apply-templates/></ref:marker><ref:locator><ref:locator-key><ref:key-name name="attachment-key"/><ref:key-value><xsl:attribute name="value"><xsl:choose><xsl:when test="@smi"><xsl:value-of select="substring-before(@filename, '.')"/></xsl:when><xsl:otherwise><xsl:value-of select="substring-before(@filename, '.')"/></xsl:otherwise></xsl:choose></xsl:attribute></ref:key-value></ref:locator-key><ref:locator-params><!-- 2017-10-04 - MDS: Added choose statement to test for stream ID to match modified monolithic in HK06
JL: 2017-10-06 added same for HK01--><!-- BRT 2018-01-02 added UK15 to choose statement. Note this template is almost exactly the same as in Rosetta_link-LxAdv-ref.lnlink_BLOBSTORE.xsl, which is commented out in UK15ds and is used by UK11dn. I don't know why both are present --><xsl:choose><xsl:when test="$streamID=('HK06' , 'HK01', 'UK15')"><proc:param name="attachment-type" value="IMG"/><proc:param name="external-or-local" value="external"/><proc:param name="attachment-server" value="BlobStore"/><proc:param name="attachment-pguid" value="urn:contentItem:0000-0000-0000-0000-00000-00"/><proc:param name="componentseq" value="1"/></xsl:when><xsl:otherwise><proc:param name="componentseq" value="1"/><proc:param><xsl:attribute name="name">attachment-type</xsl:attribute><xsl:attribute name="value"><xsl:apply-templates select="@type"/></xsl:attribute></proc:param><proc:param><xsl:attribute name="name">attachment-smi</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@smi"/></xsl:attribute></proc:param></xsl:otherwise></xsl:choose></ref:locator-params></ref:locator></ref:lnlink></doc:related-content-link></doc:related-content-item></xsl:template>
<xsl:template match="remotelink[@service='QUERY'][ancestor::docinfo:assoc-links][$streamID=('CA03', 'CA05', 'CA06', 'CA07', 'CA08')]"><xsl:choose><xsl:when test="(starts-with($streamID,'CA06') or starts-with($streamID ,'CA07')) and parent::docinfo:assoc-links-grp[@assoc-content='enabling'] and starts-with(@remotekey1 , 'DOCINFO(') and @remotekey2='All Canadian Statutes'"><xsl:call-template name="makeRelatedresourceref"><xsl:with-param name="contentType" select="'enablingLeg'"/></xsl:call-template></xsl:when><xsl:when test="(starts-with($streamID , 'CA05') or starts-with($streamID , 'CA08')) and starts-with(@remotekey1 , 'DOCINFO(') and @remotekey2='All Canadian Regulations'"><xsl:call-template name="makeRelatedresourceref"><xsl:with-param name="contentType" select="'subordinateLeg'"/></xsl:call-template></xsl:when><xsl:when test="starts-with(@remotekey1 , 'REFNUM(') and contains(@remotekey2,'All Canadian Summaries') and $streamID='CA03' and not(preceding-sibling::*[1][self::remotelink])"><doc:related-content-grp grptype="caseSummaries"><heading><title xml:lang="en-CA"><xsl:value-of select="."/></title><title xml:lang="fr-CA"><xsl:value-of select="following-sibling::remotelink"/></title></heading><doc:related-content-item content-type="caseSummaries"><ref:relatedresourceref><ref:relatedresourceid><xsl:attribute name="ref:resourcekey"><xsl:value-of select="concat('urn:ucn-1:' , substring-before(substring-after(@remotekey1 , 'REFNUM(') , ')'))"/></xsl:attribute></ref:relatedresourceid></ref:relatedresourceref></doc:related-content-item></doc:related-content-grp></xsl:when><!-- otherwise we do nothing for remotelink service QUERY --></xsl:choose></xsl:template>
Template
lnlink[@service='QUERYLINK'][parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp]
Documentation
Description
from other module: If the data content of the remotelink does not start with one of the previous listed
text sequences, <sourcexml>remotelink</sourcexml> becomes
<targetxml>ref:lnlink</targetxml> and is populated as follows:<ul>
<li>The <targetxml>ref:lnlink/@service</targetxml> attribute is set to "URL".</li>
<li>Element <targetxml>ref:lnlink/ref:marker</targetxml> is created and the content of
<sourcexml>remotelink</sourcexml> becomes the content of child
<targetxml>ref:lnlink/ref:marker</targetxml>. Any descendant element is converted
according to instructions for that element in the section <i>General Mark-Up</i>.</li>
<li>The child <targetxml>ref:lnlink/ref:locator</targetxml> is created, and within it
the child <targetxml>ref:lnlink/ref:locator/ref:locator-key</targetxml> is created,
and within it the children
<targetxml>ref:lnlink/ref:locator/ref:locator-key/ref:key-name</targetxml> and
<targetxml>ref:lnlink/ref:locator/ref:locator-key/ref:key-value</targetxml> are
created.</li>
<li>The <targetxml>ref:key-name/@name</targetxml> attribute is set to "URL".</li>
<li>If the <sourcexml>remotelink/@hrefclass</sourcexml> attribute is present,
<targetxml>ref:key-value/@value</targetxml> is set to the combined value of
<sourcexml>remotelink/@hrefclass</sourcexml>, followed by "://", followed by the
value of <sourcexml>remotelink/@href</sourcexml>.</li>
<li>If the <sourcexml>remotelink/@hrefclass</sourcexml> attribute is <b>not</b> present,
<targetxml>ref:key-value/@value</targetxml> is set to the value of
<sourcexml>remotelink/@href</sourcexml>.</li>
Namespace
No namespace
Match
lnlink[@service='QUERYLINK'][parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp]
<xsl:template match="api-params"><ref:locator-params><xsl:apply-templates/><xsl:if test="parent::lnlink[@service='ATTACHMENT']"><proc:param><xsl:attribute name="name">attachment-smi</xsl:attribute><xsl:attribute name="value"/><xsl:message>need SMI from CSSM? Is this a parameter?</xsl:message></proc:param></xsl:if></ref:locator-params></xsl:template>
<xsl:template match="param"><xsl:if test="@name!='attachment-key'"><xsl:choose><!-- Awantika: For AU20 one more param needs to be created with the name targetcontentType value practicalguidance --><xsl:when test="$streamID='AU20'"><xsl:if test="not(following-sibling::param)"><proc:param><xsl:attribute name="name"><xsl:text>targetContentType</xsl:text></xsl:attribute><xsl:attribute name="value"><xsl:text>practicalguidance</xsl:text></xsl:attribute></proc:param></xsl:if><xsl:variable name="docinfoidtext" select="/*/docinfo/docinfo:doc-id/text()"/><!-- Awantika: Need to create only proc:param for topiccode in AU20 for the specific condition --><xsl:if test="$streamID='AU20' and contains(lower-case($docinfoidtext),'analytics') and ancestor::source_cttr:annotations[@annotgroup='LPG']"><xsl:choose><xsl:when test="@name[.='topiccode']"><proc:param><xsl:attribute name="name"><xsl:text>topiccode</xsl:text></xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute></proc:param></xsl:when><xsl:otherwise/></xsl:choose></xsl:if></xsl:when><xsl:otherwise><proc:param><xsl:apply-templates select="@name | @value"/></proc:param></xsl:otherwise></xsl:choose></xsl:if></xsl:template>
This is an LBU-supplied, unsigned numeric value that indicates the relative position
of a document and must be unique within a source.
docinfo:bookseqnum becomes doc:bookseqnum.
If the attribute @ln.user-displayed exists on the element
contrib, then supress the attribute in the target xml as shown
below.
Note: Conversion needs to suppress docinfo:authorattribution/contrib when it's the child of leg:levelinfo and
levelinfo.This will be applicable to all pacific content streams.
When person is an child of docinfo:authorattribution/contrib then docinfo:authorattribution/contrib/person becomes
dc:metadata/dc:contributor/person:contributor@contributor-type="author"/person:person
Source XML
<docinfo>
<docinfo:authorattribution>
<contrib>
<person>
<name.text>Assistant Professor Bernard McCabe</name.text>
</person>
</contrib>
</docinfo:authorattribution>
</docinfo>
Target XML
<doc:docinfo>
<dc:contributor>
<person:contributor contributor-type="author">
<person:person>
<person:name.text>Assistant Professor Bernard McCabe</person:name.text>
</person:person>
</person:contributor>
</dc:contributor>
</doc:docinfo>
When docinfo:authorattribution element is having a running text
then it becomes dc:metadata/dc:contributor.
Source XML
<docinfo>
<docinfo:authorattribution>D C Pearce AO LLB (Adel) LLM (ANU) PhD (ANU)</docinfo:authorattribution>
</docinfo>
Target XML
<doc:metadata>
<doc:docinfo>
<dc:metadata>
<dc:contributor>D C Pearce AO LLB (Adel) LLM (ANU) PhD (ANU)</dc:contributor>
</dc:metadata>
</doc:docinfo>
</doc:metadata>
Exceptio scenario for AU14-Journals/Newsletters/Bulletins - When docinfo:authorattribution/contrib contains remotelink as a child element then conversion need to omit the remotelink element from conversion and retain the text in dc:contributor.
Source XML
<docinfo>
<docinfo:authorattribution>
<contrib>The following is an outline of the planned changes to the [#b#]<remotelink
dpsi="02IJ" remotekey1="REFPTID" service="DOC-ID" refpt="2000A24"
docidref="2000A24.BODY">Employment Relations Act 2000</remotelink>[#/b#] announced
by Prime Minister John Key at the National Party conference on 18 July. It was added as
a link from the press release of Minister of Labour Kate Wilkinson “90-Day Trial
Period extended to all employees”, available at [#b#]<remotelink
href="www.beehive.govt.nz/release/90-day+trial+period+extended+all+employers"
hrefclass="http" newwindow="YES"
>www.beehive.govt.nz/release/90-day+trial+period+extended+all+employers</remotelink>[#/b#].
The material is subject to Crown copyright protection.</contrib>
</docinfo:authorattribution>
</docinfo>
Target XML
<doc:metadata>
<doc:docinfo>
<dc:metadata>
<dc:contributor>The following is an outline of the planned changes to the
Employment Relations Act 2000 announced by Prime Minister John Key at the National
Party conference on 18 July. It was added as a link from the press release of
Minister of Labour Kate Wilkinson “90-Day Trial Period extended to all
employees”, available at www.beehive.govt.nz/release/90-day+trial+period+extended+all+employers.
The material is subject to Crown copyright protection.</dc:contributor>
</dc:metadata>
</doc:docinfo>
</doc:metadata>
The source elementdocinfo:currencystatement becomes doc:docinfo/currencystatment.
Note: Conversion needs to suppress docinfo:currencystatement when it's the child of leg:levelinfo and levelinfo. This will be applicable to all Pacific Content Streams.
Source XML
<docinfo:currencystatement>Consolidated as in force on <date>10 September 2012</date></docinfo:currencystatement>
Target XML
<doc:docinfo>
<currencystatement>Consolidated as in force on <date>10 September 2012</date></currencystatement>
</doc:docinfo>
The only uses of docinfo:custom-metafield in Australian and
New Zealand data all have @name="COURT-CLASSIFY". Since
metafields with this name should be suppressed, all occurrances of
docinfo:custom-metafield should be suppressed. Further,
because docinfo:custom-metafield is the only child of
docinfo:custom-metafields, the entire
docinfo:custom-metafields can be suppressed.
For CA Dictionary only: docinfo:custom-metafield
name="JURIS-SORT", docinfo:custom-metafield
name="COURT-SORT, and docinfo:custom-metafield
name="TERM-SORT, should be retained in the target.
If docinfo:doc-country[@iso-cc="AU"], check the value of case:headnote/case:info/case:courtinfo//case:juris. If
case:juris="NZ", set doc:docinfo[@doc-content-country="NZ"].
Note: @doc-content-country is required.
Note: docinfo:doc-country[@iso-cc] is used to specify the country in the source document and also becomes part of @xml:id as described in
the instructions for Target @xml:lang.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo.doc-country_iso-cc-LxAdv-doc.docinfo_doc-content-country.dita
<xsl:template name="doc_content_country"><!-- This template creates @doc-content-country from doc-country
however there is an NZ special case --><!-- 2017-10-03 - MDS: Added handling for $streamID starts with 'HK' --><!-- Awantika: 2017-10-11: added streamID HK in else to replace AU(which is given in input) --><xsl:attribute name="doc-content-country" select=" if (//docinfo:doc-country/@iso-cc = 'AU' or ($streamID='AU08')) then if (//case:headnote/case:info/case:courtinfo//case:juris = 'NZ') then 'NZ' else if(starts-with($streamID, 'HK'))then 'HK' else 'AU' else if(starts-with($streamID, 'HK')) then if (//docinfo:doc-country/@iso-cc) then //docinfo:doc-country/@iso-cc else 'HK' else //docinfo:doc-country/@iso-cc "/></xsl:template>
Template
docinfo:doc-heading
Documentation
Description
Instructions [common element]
docinfo:doc-heading becomes
dc:metadata/dc:title.
Exceptional scenario for CA Indices: When docinfo:doc-heading
contains word TITLE: or NAME: or SITE: or SUBJECT:
or RULE: or STATUTE: then conversion should drop the word TITLE:
or NAME: or SITE: or SUBJECT: or RULE: or
STATUTE: from conversion.
Exceptional scenario for AU Legislative Citator: When docinfo:doc-heading
contains text Overview Tab for then conversion should drop the this text
Overview Tab for from conversion.
Exceptional scenario for US Lexis Practice Advisor (LPA):
In addition to the standard mapping above, perform the following mappings. An
example has been added
below. With this addition, the target output document will always contain three
dc:title elements; the one created above without any attributes, as well as
the two below with a @lnmeta:titlepurpose attribute:
docinfo:doc-heading also maps to become
dc:metadata/dc:title[@lnmeta:titlepurpose='resultDisplayList'].
If docinfo:doc-heading ends with a string enclosed by parentheses
(e.g. "Patent License Agreement (Pro-Licensee)"), remove
the parentheses and the enclosed text, remove any trailing spaces in the remaining
text, and
the remaining text becomes the content of a new
dc:metadata/dc:title[@lnmeta:titlepurpose='download'] element.
If docinfo:doc-heading does not end with a string inside parentheses,
map docinfo:doc-heading, with all of its text content, to a new
dc:metadata/dc:title[@lnmeta:titlepurpose='download'] element.
<docinfo:doc-heading>West Energy Ltd. (Re), [2007] A.E.U.B.D. No. 57</docinfo:doc-heading>
Target XML
<dc:title>West Energy Ltd. (Re), [2007] A.E.U.B.D. No. 57</dc:title>
Source XML - Example for UK Content
<docinfo:doc-heading>In re B (Children) (Care Proceedings: Standard of Proof) (CAFCASS intervening) - [2009] AC 11</docinfo:doc-heading>
Target XML - Example for UK Content
<dc:title>In re B (Children) (Care Proceedings: Standard of Proof) (CAFCASS intervening) - [2009] AC 11</dc:title>
Note: If emph is child of docinfo:doc-heading
then suppress emph element and retain its content in
dc:title.
Note: For Canada Contents: if nl is child of
docinfo:doc-heading, then replace it with single space
character. For furter details please see the following example.
Source XML- From CAN
<docinfo:doc-heading>90F32<nl/>Memorandum of Argument of the Applicant</docinfo:doc-heading>
Target XML
<dc:title>90F32 Memorandum of Argument of the Applicant</dc:title>
Note: Exception Scenario for Canada CA14:
Trademarks and related marks: When (TM)
or (R) occur in docinfo:doc-heading, convert to unicode code
point as follows:
(TM) becomes ™
(R) becomes ®
Source XML- From CA14
<docinfo:doc-heading>Alan D. Gold's NetLetter(TM), Monday, November 24, 2008 - Issue 615</docinfo:doc-heading>
Target XML for CA14
<dc:title>Alan D. Gold's NetLetter™, Monday, November 24, 2008 - Issue 615</dc:title>
if ($streamID = 'CA11') then ( 'TITLE:' , 'NAME:' , 'SITE:' , 'SUBJECT:' , 'RULE:'
, 'STATUTE:' ) else if ($streamID = 'CA15') then ('TITLE/TITRE:' , 'TITRE/TITLE:','CITED/CITÉ:','CITÉ/CITED:','CITE/CITED:','CITED:','TITLE:'
, 'TITRE:') else 'Overview Tab for'
xs:string*
Import precedence
0
Source
<xsl:template match="docinfo:doc-heading"><!-- these are used as regexes --><xsl:param name="docHeadingStringsToRemove" as="xs:string*" select="if ($streamID = 'CA11') then ( 'TITLE:' , 'NAME:' , 'SITE:' , 'SUBJECT:' , 'RULE:' , 'STATUTE:' ) else if ($streamID = 'CA15') then ('TITLE/TITRE:' , 'TITRE/TITLE:','CITED/CITÉ:','CITÉ/CITED:','CITE/CITED:','CITED:','TITLE:' , 'TITRE:') else 'Overview Tab for' "/><xsl:variable name="outputText" as="xs:string*"><xsl:apply-templates/></xsl:variable><!-- Original Target XPath: dc:title --><dc:title><!-- remove any occurrence of $docHeadingStringsToRemove strings but assume case sensitive; also replace (TM) and (R) with the trademark and copyright characters, respectively, all depending on streamID --><xsl:choose><xsl:when test=" $streamID = ( 'CA11' , 'AU20', 'CA15' ) "><xsl:sequence select=" lnf:removeSequenceOfStrings( string-join( $outputText , '' ) , $docHeadingStringsToRemove , false() ) "/></xsl:when><xsl:when test=" $streamID = 'CA14' "><xsl:sequence select="replace( replace( string-join( $outputText , '' ) , '\(TM\)' , '™' ) , '\(R\)' , '®' )"/></xsl:when><xsl:when test="$streamID = 'CA06' or $streamID = 'CA12' or $streamID = 'CA10'or $streamID = 'CA09'"><xsl:value-of select="."/></xsl:when><xsl:otherwise><xsl:apply-templates select="@* | node()"/></xsl:otherwise></xsl:choose></dc:title><xsl:if test="$streamID='USLPA'"><dc:title><xsl:attribute name="lnmeta:titlepurpose"><xsl:text>resultDisplayList</xsl:text></xsl:attribute><xsl:apply-templates select="@* | node()"/></dc:title><dc:title><xsl:attribute name="lnmeta:titlepurpose"><xsl:text>download</xsl:text></xsl:attribute><xsl:apply-templates select="@* | node()"/></dc:title></xsl:if></xsl:template>
Template
docinfo:doc-heading/emph
Namespace
No namespace
Match
docinfo:doc-heading/emph
Mode
#default
Import precedence
0
Source
<xsl:template match="docinfo:doc-heading/emph"><!-- Original Target XPath: dc:title --><!-- emph is pass-through when under doc-heading --><xsl:apply-templates select="@* | node()"/></xsl:template>
Template
docinfo:doc-heading/nl
Namespace
No namespace
Match
docinfo:doc-heading/nl
Mode
#default
Import precedence
0
Source
<xsl:template match="docinfo:doc-heading/nl"><!-- Original Target XPath: dc:title --><!-- @SBy: nl becomes a space when under doc-heading; implemented for ***all*** streamIDs, not just Canada Contents... --><xsl:text></xsl:text></xsl:template>
Template
docinfo:doc-id
Documentation
Description
Instructions [common element]
Identifies the normalization scheme (e.g. URI, LNI, ISSN, et al.) used for the
identifier. docinfo:doc-id becomes
dc:metadata/dc:identifier[@lnmeta:identifier-scheme].
Also capture docinfo:dpsi[@id-string] and prepend the
value, followed by hyphen, to create globally unique identifier.
Note:
If docinfo:dpsi[@id-string] is not present, the dpsi value
must be captured from one of the following sources:
The value in
docinfo/docinfo:lbu-meta/docinfo:metaitem[@name="DPSI"]/@value
The value in
docinfo/docinfo:custom-metafields/docinfo:custom-metafield[@name="dpsi"]
<xsl:template name="xml_lang"><!-- This template creates @xml:lang from doc-lang and doc-country
however there is an NZ special case --><!-- 2017-10-03 - MDS: Added handling for $streamID starts with 'HK' --><xsl:attribute name="xml:lang" select=" concat( //docinfo:doc-lang/@lang , '-' , if (//docinfo:doc-country/@iso-cc = 'AU' or ($streamID='AU08')) then if (//case:headnote/case:info/case:courtinfo//case:juris = 'NZ') then 'NZ' else 'AU' else if(starts-with($streamID, 'HK')) then if (//docinfo:doc-country/@iso-cc) then //docinfo:doc-country/@iso-cc else 'HK' else //docinfo:doc-country/@iso-cc ) "/></xsl:template>
Template
docinfo:dpsi[@id-string]
Documentation
Description
Instructions [common element]
docinfo:dpsi[@id-string] becomes doc:metadata/doc:docinfo/doc:legacy-metadata[@metadatasource="lbu-meta"]/meta/metaitem
with attributes @name="dpsi" and @value set to @id-string. Note that only one meta is created for the various metaitem child elements that are created
while processing docinfo and docinfo:dpsi. For more information, see the
instructions for docinfo.
Note: @id-string value is also used in mapping
for docinfo:doc-id
Note: If docinfo:dpsi[@id-string] is not present,
the dpsi value must be captured from one of the following sources:
The value in docinfo/docinfo:lbu-meta/docinfo:metaitem[@name="DPSI"]/@value
<xsl:template match="docinfo:hier"><!-- Original Target XPath: doc:hier --><doc:hier><xsl:if test="$streamID = ('CA05', 'CA06', 'CA07', 'CA08')"><xsl:if test="child::docinfo:hierlev/@exclude-from-displayunits = 'true'"><xsl:attribute name="includeintoc"><xsl:text>false</xsl:text></xsl:attribute></xsl:if></xsl:if><!-- @SBy: process the first descendant docinfo:hierlev/@exclude-from-displayunits where that attribute is true. So if this attribute appears on any docinfo:hierlev and is true, then @includeintoc will be set to false --><!-- UK06 Requires indicators of first and last --><xsl:if test="$streamID = ('UK06','UK07')"><proc:processinginfo><xsl:attribute name="process">LAToCBuilder</xsl:attribute><xsl:choose><xsl:when test="/LEGDOC/docinfo/docinfo:custom-metafields/docinfo:custom-metafield[@name='is-first-document-in-enactment'] = 'true'"><proc:param name="firstLegisItem" value="true"/></xsl:when><xsl:otherwise><proc:param name="firstLegisItem" value="false"/></xsl:otherwise></xsl:choose><xsl:choose><xsl:when test="/LEGDOC/docinfo/docinfo:custom-metafields/docinfo:custom-metafield[@name='is-last-document-in-enactment'] = 'true'"><proc:param name="lastLegisItem" value="true"/></xsl:when><xsl:otherwise><proc:param name="lastLegisItem" value="false"/></xsl:otherwise></xsl:choose></proc:processinginfo></xsl:if><!-- <xsl:if test=" $streamID = ( 'CA06' , 'CA07' , 'CA08' ) ">
<xsl:apply-templates select="descendant::docinfo:hierlev[ @exclude-from-displayunits = 'true' ][1]/@exclude-from-displayunits"/>
</xsl:if>--><xsl:apply-templates select="@* | node()"/></doc:hier></xsl:template>
<xsl:template match="docinfo:hier[$streamID = ('CA05','CA06', 'CA07', 'CA08', 'CA10')]"><!-- Original Target XPath: doc:hier --><xsl:variable name="dpsi_value"><xsl:value-of select="//docinfo:custom-metafield[@name = 'dpsi']"/></xsl:variable><xsl:variable name="dpsi_value_CA10"><xsl:value-of select="substring(/COMMENTARYDOC/docinfo/docinfo:doc-id,1,4)"/></xsl:variable><doc:hier><!-- @SBy: process the first descendant docinfo:hierlev/@exclude-from-displayunits where that attribute is true. So if this attribute appears on any docinfo:hierlev and is true, then @includeintoc will be set to false --><xsl:choose><xsl:when test="($dpsi_value = $Title_Dpsi_Code//@key) and $streamID!=('CA06', 'CA07', 'CA08')"><doc:hierlev><heading><title><xsl:value-of select="key('dpsititle', //docinfo:custom-metafield[@name = 'dpsi'], $Title_Dpsi_Code)/@value"/></title></heading><xsl:apply-templates select="descendant::docinfo:hierlev[@exclude-from-displayunits = 'true'][1]/@exclude-from-displayunits"/><xsl:apply-templates select="@* | node()"/></doc:hierlev></xsl:when><xsl:when test="($dpsi_value = $Title_Dpsi_Code_CA05//@key) and $streamID='CA05'"><doc:hierlev><heading><title><xsl:value-of select="key('dpsititle', //docinfo:custom-metafield[@name = 'dpsi'], $Title_Dpsi_Code_CA05)/@value"/></title></heading><xsl:apply-templates select="descendant::docinfo:hierlev[@exclude-from-displayunits = 'true'][1]/@exclude-from-displayunits"/><xsl:apply-templates select="@* | node()"/></doc:hierlev></xsl:when><xsl:when test="($dpsi_value = $Title_Dpsi_Code_CA10//@key or $dpsi_value_CA10=$Title_Dpsi_Code_CA10//@key) and $streamID='CA10'"><doc:hierlev><heading><title><xsl:value-of select="key('dpsititle', substring(/COMMENTARYDOC/docinfo/docinfo:doc-id,1,4), $Title_Dpsi_Code_CA10)/@value"/></title></heading><xsl:apply-templates select="descendant::docinfo:hierlev[@exclude-from-displayunits = 'true'][1]/@exclude-from-displayunits"/><xsl:apply-templates select="@* | node()"/></doc:hierlev></xsl:when><xsl:otherwise><xsl:apply-templates select="descendant::docinfo:hierlev[@exclude-from-displayunits = 'true'][1]/@exclude-from-displayunits"/><xsl:apply-templates select="@* | node()"/></xsl:otherwise></xsl:choose></doc:hier></xsl:template>
Template
docinfo:hier[$streamID = 'CA01']
Documentation
Description
@Vikas Rohilla: Template to match the docinfo:hier for the $streamID ='CA01'
<xsl:template match="docinfo:hierlev"><!-- Original Target XPath: doc:hier/doc:hierlev --><doc:hierlev><!-- @SBy: @exclude-from-displayunits already taken care of in creating doc:hier/@includeintoc --><xsl:apply-templates select="@* except @exclude-from-displayunits"/><xsl:apply-templates select="node()"/><xsl:apply-templates select="following-sibling::*[1][self::docinfo:hierlev]" mode="hierlevSibling"/></doc:hierlev></xsl:template>
*** @SBy: These requirements are covered via other modules: ***
<li><sourcexml>docinfo:hier/docinfo:hierlev/heading</sourcexml> becomes
<targetxml>doc:hier/doc:hierlev/heading</targetxml>
</li>
<li><sourcexml>docinfo:hier/docinfo:hierlev/heading/title</sourcexml> becomes
<targetxml>doc:hier/doc:hierlev/heading/title</targetxml>
</li>
<xsl:template match="docinfo:hierlev/heading/title/nl[$streamID = ('CA06', 'CA07')]"><!-- @SBy: note that otherwise nl will become proc:nl which is permitted within title --><xsl:text></xsl:text></xsl:template>
<xsl:template match="docinfo:hierlev/heading/title/num[$streamID = 'CA09']"><!-- @SBy: note that otherwise num will become num which is permitted within title --><!-- Original Target XPath: doc:hierdoc:hierlevheadingtitle --><xsl:apply-templates select="@* | node()"/></xsl:template>
docinfo:lbu-indexing-terms/docinfo:lbu-subj becomes
classify:classification[@classscheme="lbu-subj"]/classify:classitem/classify:classitem-identifier/classify:classcode[@normval].
The content of docinfo:lbu-subj becomes the value for classify:classcode[@normval].
Note: If source document having multiple docinfo:lbu-subj within docinfo:lbu-indexing-terms, then each subsequent occurrence of the element docinfo:lbu-subj will becomesclassify:classitem/classify:classitem-identifier/classify:classcode[@normval] element.
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo.lbu-indexing-terms-LxAdv-classify.classification_classscheme_lbu-subj-scheme.dita
<xsl:template match="docinfo:lbu-juris[$streamID='CA01'][.!='CA' or .!='UK' or .!='NZ']"><xsl:element name="classify:classitem"><xsl:element name="classify:classitem-identifier"><xsl:element name="classify:classname"><xsl:value-of select="."/></xsl:element></xsl:element></xsl:element></xsl:template>
Template
docinfo:lbu-meta
Documentation
Description
Instructions [common element]
docinfo:lbu-meta becomes
doc:legacy-metadata[@metadatasource="lbu-meta"].
docinfo:metaitem becomes
meta/metaitem. The source attribute
@name becomes metaitem[@name] and
@value becomes metaitem[@value].
docinfo:metaitem should be dropped if the attribute
@name has any of the following drop list values:
<xsl:template match="docinfo:metaitem"><xsl:choose><xsl:when test="@name='date' or @name='juris' or @name='court' or @name='country' or @name='parent-filename' or @name='PA-PGUID' or @name='TOPIC-PGUID' or @name='SUB-TOPIC-PGUID' "/><xsl:otherwise><!-- @name='parent-docid'and name='lbu-sourcename' are two values that need to be converted for court cases --><metaitem><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute></metaitem></xsl:otherwise></xsl:choose></xsl:template>
The below example encountered in CANADA contents which contains "00" value in
@day="00" and @month="00"
attributes.
Per LBU- This was the format used for historical data in which only the year was given. We
will remediate the content to have a valid month/day and will send the remediated
data in a subsequent reload.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_date-Chof-docinfo.load-date-LxAdv-dc.date_lnmeta.datetype_load-date-scheme.dita
Note: Conversion needs to suppress docinfo:overview when it's the
child of leg:levelinfo and levelinfo. This
will be applicable to all Pacific Content Streams.
Source XML
<docinfo> <docinfo:overview type="editorial"> <p>
<text>This is a document transactional overview sample for AU05 Commentary Form
content type/stream. It is indicative text only and not a sample of actual text that will
be included but used here to identify the particular element used for this
purpose.</text> </p> </docinfo:overview> </docinfo>
Target XML
<doc:docinfo> <doc:overview type="editorial"> <bodytext>
<p> <text>This is a document transactional overview sample for AU05 Commentary
Form content type/stream. It is indicative text only and not a sample of actual text that
will be included but used here to identify the particular element used for this
purpose.</text> </p> </bodytext> </doc:overview>
</doc:docinfo>
Note: For UK streams: If input documents is having
docinfo:overview@type markup with attribute value "abstract"
then conversion needs to mapped doc:overview@type="abstract" in
NewLexis target. Refer input and target examples;
Source XML
<docinfo> <docinfo:overview type="abstract"> <p>
<text>VAT – default surcharge – reasonable excuse – dismissal of key employee –
reliance on another person</text> </p> </docinfo:overview>
</docinfo>
Target XML
<doc:docinfo> <doc:overview type="abstract"> <bodytext>
<p> <text>VAT – default surcharge – reasonable excuse – dismissal of key
employee – reliance on another person</text> </p> </bodytext>
</doc:overview> </doc:docinfo>
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo.overview-LxAdv-docinfo.overview.dita
CSN: Added docinfo:overview from base.xsl.
Namespace
No namespace
Match
docinfo:overview
Mode
#default
Import precedence
0
Source
<xsl:template match="docinfo:overview"><xsl:choose><xsl:when test="(parent::levelinfo or parent::leg:levelinfo) and (//docinfo:doc-country/@iso-cc = 'NZ' or //docinfo:doc-country/@iso-cc = 'AU')"/><xsl:otherwise><xsl:element name="doc:overview"><xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute><xsl:choose><xsl:when test="bodytext"><xsl:apply-templates select="node()"/></xsl:when><xsl:otherwise><bodytext><xsl:apply-templates select="node()"/></bodytext></xsl:otherwise></xsl:choose></xsl:element></xsl:otherwise></xsl:choose></xsl:template>
docinfo:selector becomes classify:classification[@classscheme="selector"]/classify:classitem/classify:classitem-identifier/classify:classname. Each subsequent occurrence of the element docinfo:selector adds a sibling /classify:classitem/classify:classitem-identifier/classify:classname
element.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo.subtype-LxAdv-doc.legacy-metadata_metadatasource_lbu-meta-scheme.dita
docinfo:topiccodes/docinfo:topiccode becomes
classify:classification[@classscheme="docinfo:topiccodes"]/classify:classitem/classify:classitem-identifier/classify:classcode/@normval.
The content of docinfo:topiccode becomes the value for
classify:classcode/@normval. A single
classify:classification[@classscheme="docinfo:topiccodes"]
is created for each unique value of @classscheme. Within
this single element, create multiple classify:classitem
elements. Only create additional classify:classification
wrapper elements when the
classify:classification[@classscheme] has different
values.
Note: Applied for UK07 Regulation contents only: When element
docinfo:topiccode contains attribute
@scheme="source-by-date", then conversion will
suppress it including its contents as well. Please see below input and output
examples for more details:
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_docinfo.topiccodes-to-LxAdv-classify.classification_classscheme_docinfo-topiccodes.dita
CSN: Added docinfo:topiccodes and docinfo:topiccode from base.xsl.
Added the attribute @normdate (value must be in 'YYYY-MM-DD')
inside the target doc:startdate and
doc:enddate elements.
If one or more of the three date values (year, month or day) are absent,
then attribute @normdate should not be
populated.
The @normdate attribute value shoud be generated
from target attributes (@year,
@month and @day),
which are comes under the doc:startdate and
doc:enddate elements within New Lexis.
Note:
Added the mapping of @startdate-tbd
attribute which is comes under docinfo:versioninfo
element in source then it should be mapped in target
doc:versioninfo@startdate-tbd (attribute value must
be in 'true' OR 'false', default value is 'false').
For CA05 Acts&Bills and CA08 Constitutions, suppress
docinfo:versioninfo from conversion if it has the
following variations:
The above variations should be considered as "empty" and needs to be
suppressed from conversion.
When transforming the attribute values, enforce these constraints:
The @day value must be two digit number, i.e. from
'01' to '31'.
The @month value must be transformed to a two digit number from '01' to '12', i.e. 'January'
= '01' and 'December' = '12'.
The @year value must be a four digit number, i.e. '2011'.
Note: Exception for Canada: Conversion should generate @day attribute
value in sequential digit. No need to add leading zero (0) to make the value in
two digits.
<xsl:template name="dateAtts"><xsl:variable name="dayValue" as="xs:integer"><xsl:choose><xsl:when test="@day"><xsl:value-of select="xs:integer(@day)"/></xsl:when><xsl:otherwise><xsl:text>0</xsl:text></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="monthValue" as="xs:integer"><xsl:choose><xsl:when test="@month"><xsl:value-of select="xs:integer(@month)"/></xsl:when><xsl:otherwise><xsl:text>0</xsl:text></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="monthValueString" as="xs:string" select="if ($monthValue lt 10 and $monthValue gt 0) then concat( '0' , string($monthValue) ) else string($monthValue)"/><xsl:variable name="yearValue" as="xs:integer" select="xs:integer(@year)"/><xsl:variable name="current2digitYear" as="xs:integer" select="xs:integer(substring(string(current-date()),3,2))"/><xsl:variable name="outputDay" as="xs:boolean" select="if ($dayValue gt 0 and $dayValue lt 32) then true() else false()"/><xsl:variable name="outputMonth" as="xs:boolean" select="if ($monthValue gt 0 and $monthValue lt 13) then true() else false()"/><xsl:variable name="outputYear" as="xs:boolean" select="if ($yearValue gt 0) then true() else false()"/><xsl:variable name="dayNorm" as="xs:string" select="if ($dayValue lt 10) then concat( '0' , string($dayValue) ) else string($dayValue)"/><xsl:variable name="yearNorm" as="xs:string" select="if ($yearValue lt 10) then concat( '200' , string($yearValue) ) else if ($yearValue le $current2digitYear) then concat( '20' , string($yearValue) ) else if ($yearValue lt 100) then concat( '19' , string($yearValue) ) else if ($yearValue lt 1000) then concat( '0' , string($yearValue) ) else string($yearValue)"/><xsl:if test="$outputDay and $outputMonth and $outputYear"><xsl:attribute name="day" select="$dayValue"/><xsl:attribute name="normdate" select="concat($yearNorm,'-',$monthValueString,'-',$dayNorm)"/></xsl:if><xsl:if test="$outputMonth and $outputYear"><xsl:attribute name="month" select="$monthValueString"/></xsl:if><xsl:if test="$outputYear"><xsl:attribute name="year" select="$yearValue"/></xsl:if></xsl:template>
Template
alttitle
Documentation
Description
alttitle becomes alttitle.
Source XML
<leg:heading>
<desig searchtype="CHAP-NUM"><designum><refpt id="CPSA.SDCR.SDCR.PT2" type="ext"/>Part II</designum></desig>
<title searchtype="CHAP-TITLE"> — Application of Part I [<emph typestyle="it">Supreme Court Only</emph>]</title>
<alttitle>Part III — The Civil Division — Procedures under Special Acts [<emph typestyle="it">District Court Only</emph>]</alttitle>
</leg:heading>
Target XML
<heading>
<desig>Part II</desig>
<title> — Application of Part I [<emph typestyle="it">Supreme Court Only</emph>]</title>
<alttitle>Part III — The Civil Division — Procedures under Special Acts [<emph typestyle="it">District Court Only</emph>]</alttitle>
</heading>
<xsl:template match="alttitle"><!-- Original Target XPath: alttitle --><alttitle><xsl:apply-templates select="@* | node()"/></alttitle></xsl:template>
Template
blockquote
Documentation
Description
Instructions
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
Please note that the conversion of blockquote must follow specific rules based on its location in the source document.
These context sensitive aspects are not all discussed in detail in the general instructions
given here.
Please see the specific document type instructions for more information regarding
the context sensitive conversion details of this element.
If there is any contradiction between these general instructions and the document
type specific instructions, the specific instructions should be given precedence.
In general, blockquote becomes blockquote.
If figure or legfragment occur within
blockquote then drop blockquote
element.
If insert-line occurs as the only child within blockquote
then drop outer blockquote in NewLexis conversion.
Source XML
<blockquote>
<p>
<text>
<emph typestyle="it">Ordinary Resolution</emph>
</text>
</p>
<p>
<text>
<emph typestyle="it">Approval of new issue of Securities</emph>
</text>
</p>
<p>
<text>To consider, and if thought fit, pass with or without amendment, the following resolution as an ordinary resolution:</text>
</p>
<p>
<blockquote>
<p>
<text>“That for the purposes of ASX Listing Rule 7.1 and for all other purposes, the Company approves and agrees to the issue of 35,000,000 ordinary fully paid shares in the capital of the Company to Greater Pacific Gold Limited as consideration for the variation of the Joint Venture Agreement entered into between the Company and Greater Pacific Gold Limited on the terms and conditions set out in the Explanatory Statement accompanying this Notice of Meeting.”
</text>
</p>
</blockquote>
</p>
</blockquote>
Target XML
<blockquote>
<p>
<text>
<emph typestyle="it">Ordinary Resolution</emph>
</text>
</p>
<p>
<text>
<emph typestyle="it">Approval of new issue of Securities</emph>
</text>
</p>
<p>
<text>To consider, and if thought fit, pass with or without amendment, the following resolution as an ordinary resolution:</text>
</p>
<p>
<blockquote>
<p>
<text>“That for the purposes of ASX Listing Rule 7.1 and for all other purposes, the Company approves and agrees to the issue of 35,000,000 ordinary fully paid shares in the capital of the Company to Greater Pacific Gold Limited as consideration for the variation of the Joint Venture Agreement entered into between the Company and Greater Pacific Gold Limited on the terms and conditions set out in the Explanatory Statement accompanying this Notice of Meeting.”
</text>
</p>
</blockquote>
</p>
</blockquote>
If source document having "2" or more blockquote elements in sibling,
then convert all blockquote into only one
blockquote element in NL conversion.
Source XML
<blockquote>
<p><text>[24] Showing the jury what the appellant looked like when wearing the balaclava and overalls that were in evidence (with or without the addition of sunglasses that had not been received in evidence) could not “rationally affect (directly or indirectly) the assessment of the probability of the existence of a fact in issue in the proceeding”. <fnr fnrtoken="ABCE.ACE.1002.ANT15-R" fntoken="ABCE.ACE.1002.ANT15">15</fnr> The central issue at the appellant’s trial was whether he was the robber. There was no dispute that there had been a robbery. There was no dispute that the robber had been wearing a balaclava, overalls and sunglasses.</text></p>
</blockquote>
<blockquote>
<p><text>[25] No one asserted, however, that the person wearing the disguise of balaclava, overalls and sunglasses could be identified by looking at that person during the robbery or could be identified by looking at the security photographs. None of the witnesses, not even the witness who had seen the robber without the balaclava pulled down over his face, said that they could recognise the man who was thus attired. None of the witnesses, and neither trial counsel, asserted that the person depicted in the security photographs could be identified.</text></p>
</blockquote>
<blockquote>
<p><text>[26] Looking at the appellant wearing the balaclava and overalls (with or without sunglasses) enabled a comparison between no more than the items he put on and what was depicted in the security photographs. But that comparison could be drawn without the appellant being asked to put them on. Dressing the appellant in the items provided no information to the jury that could rationally affect, directly or indirectly, the determination of any fact in issue because it revealed nothing about the wearer and nothing about the appellant that was not already apparent to the jury observing him in the dock.</text></p>
</blockquote>
Source XML
<blockquote>
<p><text>[24] Showing the jury what the appellant looked like when wearing the balaclava and overalls that were in evidence (with or without the addition of sunglasses that had not been received in evidence) could not “rationally affect (directly or indirectly) the assessment of the probability of the existence of a fact in issue in the proceeding”. <footnote/> The central issue at the appellant’s trial was whether he was the robber. There was no dispute that there had been a robbery. There was no dispute that the robber had been wearing a balaclava, overalls and sunglasses.</text></p>
<p><text>[25] No one asserted, however, that the person wearing the disguise of balaclava, overalls and sunglasses could be identified by looking at that person during the robbery or could be identified by looking at the security photographs. None of the witnesses, not even the witness who had seen the robber without the balaclava pulled down over his face, said that they could recognise the man who was thus attired. None of the witnesses, and neither trial counsel, asserted that the person depicted in the security photographs could be identified.</text></p>
<p><text>[26] Looking at the appellant wearing the balaclava and overalls (with or without sunglasses) enabled a comparison between no more than the items he put on and what was depicted in the security photographs. But that comparison could be drawn without the appellant being asked to put them on. Dressing the appellant in the items provided no information to the jury that could rationally affect, directly or indirectly, the determination of any fact in issue because it revealed nothing about the wearer and nothing about the appellant that was not already apparent to the jury observing him in the dock.</text></p>
</blockquote>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_blockquote-LxAdv-blockquote.dita
JL: refactored :
1. if legfragment will end up being a child of bodytext if we strip away the paragraph and/or blockquote wrapper, we strip the
blockquote wrapper. This leads to an extensive list of potential input parents in the first condition. PLEASE NOTE: this
condition works together with the generic Rosetta_p-LxAdv-p.xsl module.
2. If blockquote has certain other children, such as figure, we remove the blockquote wrapper for those children.
3. If blockquote doesn't meet conditions 1 and 2 above, and if it has adjacent sibling blockquotes that also don't meet the conditions 1 and 2 above, that
blockquote and its siblings are merged into one blockquote element.
REFACTORED AGAIN!!!!!!
ANY CONDITION OF COMPLEXITY SHOULD PREVENT MERGE.
THESE CONDITIONS PREVENT MERGE:
1. legfragment conditions - this is the case where there is no merge and the blockquote wrapper is dropped
2. child bump-ups - this is the case some children become siblings of blockquote and blockquote wrappers
will open and close as necessary until all children are output properly
3. blockquote is empty - nothing will be output and nothing will be merged
4. blockquote will be wrapped in other elements such as bodytext.
5. any other specific conditions that will make merging difficult or impossible.
THESE CONDITIONS CAUSE A MERGE to start:
current blockquote does not have a prevent-merge condition
first preceding sibling is not a blockquote with a merge condition
THESE CONDITIONS CAUSE A MERGE TO continue on
current blockquote does not have a prevent-merge condition
first following sibling is a blockquote that does not have a prevent-merge condition.
THESE CONDITIONS CAUSE A MERGE TO stop
current blockquote does not have a prevent-merge condition
first following sibling is not a blockquote with a merge condition.
IF YOU ADD A NEW CONDITION TO PREVENT MERGE to this template:
make sure to add an xsl:when with the condition at the annotated place
with the desired non-merged output; also add the condition as an xsl:when to
the named 'doImeetMergeConditions' template with the value 'false'.
<xsl:template match="blockquote"><xsl:variable name="currentMergeConditions"><xsl:call-template name="doImeetMergeConditions"/></xsl:variable><xsl:variable name="precedingSibMergeConditions"><xsl:choose><xsl:when test="not(preceding-sibling::*[1])">false</xsl:when><xsl:otherwise><xsl:for-each select="preceding-sibling::*[1]"><xsl:call-template name="doImeetMergeConditions"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="followingingSibMergeConditions"><xsl:choose><xsl:when test="not(following-sibling::*[1])">false</xsl:when><xsl:otherwise><xsl:for-each select="following-sibling::*[1]"><xsl:call-template name="doImeetMergeConditions"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:variable><xsl:choose><!-- THIS IS A PREVENT-MERGE CONDITION --><!-- JD: 2017-07-21: added trap for empty node to match DT output. (suppress <blockquote/> from output --><xsl:when test="not(node())"/><!-- Vikas Rohilla : 2017-08-09 added parent is case:factsummary --><xsl:when test="legfragment and not(child::*[2]) and (parent::p[parent::*:bodytext or parent::pgrp or parent::li or parent::fnbody or parent::glp:note or parent::case:judgmentbody or parent::case:appendix] or parent::*:bodytext or parent::li or parent::pgrp or parent::fnbody or parent::glp:note or parent::case:judgmentbody or parent::case:appendix or parent::case:factsummary)"><!-- THIS IS A PREVENT-MERGE CONDITION --><xsl:apply-templates/></xsl:when><!--<xsl:when test="ancestor::frm:divs[$streamID='UK12']">
<xsl:apply-templates select="node()"/>
</xsl:when>--><xsl:when test="parent::case:decisionsummary and $streamID='UK03'"><!-- THIS IS A PREVENT-MERGE CONDITION --><bodytext><blockquote><xsl:apply-templates select="node()"/></blockquote></bodytext></xsl:when><xsl:when test="$streamID='AU09' and parent::case:decisionsummary and child::case:embeddedcase/child::case:content"><!-- THIS IS A PREVENT-MERGE CONDITION --><xsl:apply-templates select="@* | node()"/></xsl:when><xsl:when test="figure or (insert-line and not(child::*[2])) or (parent::glp:note and descendant::inlineobject[@filename = 'leg1.gif' or @filename = 'leg1.png'])"><!-- THIS IS A PREVENT-MERGE CONDITION --><!-- do not group because it introduces too much complexity. These are your normal bump-ups.
--><xsl:for-each-group select="*" group-adjacent="if (self::figure or (self::insert-line and not(parent::blockquote/child::*[2])) or (parent::blockquote[parent::glp:note] and descendant-or-self::inlineobject[@filename = 'leg1.gif' or @filename = 'leg1.png'])) then 0 else 1"><xsl:choose><xsl:when test="current-grouping-key()=0"><xsl:apply-templates select="current-group()"/></xsl:when><xsl:otherwise><blockquote><xsl:apply-templates select="current-group()"/></blockquote></xsl:otherwise></xsl:choose></xsl:for-each-group></xsl:when><!-- IF YOU HAVE ANY OTHER CONDITION REQUIRING SPECIAL HANDLING AND OPTING OUT OF THE MERGE, ADD IT HERE
AND IN THE NAMED 'doImeetMergeConditions' TEMPLATE BELOW. ASSIGN IT THE VALUE 'false' IN THAT NAMED TEMPLATE.--><!-- THE FOLLOWING CONDITION IS A CONDITION THAT ALLOWS MERGE TO START
IT MUST EXCLUDE ALL PREVENT-MERGE CONDITIONS - this can be done by placing prevent-merge conditions first
IT MUST SPECIFICALLY INCLUDE ALL START-MERGE CONDITIONS
--><xsl:when test="$currentMergeConditions='true' and $precedingSibMergeConditions='false'"><!-- this is a simple blockquote and can be the start of a group as long as all the simple blockquotes are consecutive--><blockquote><xsl:apply-templates/><xsl:if test="$followingingSibMergeConditions='true'"><xsl:apply-templates select="following-sibling::*[1][self::blockquote]" mode="next"/></xsl:if></blockquote></xsl:when><xsl:when test="$precedingSibMergeConditions='true' and $currentMergeConditions='true'"><!-- this becomes part of the merge so we don't want to hit it twice --></xsl:when><xsl:otherwise><blockquote><xsl:apply-templates/></blockquote></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="blockquote" mode="next"><!-- we do not need to test for current merge conditions because we have already tested for it in the condition where the template is called --><xsl:variable name="followingingSibMergeConditions"><xsl:choose><xsl:when test="not(following-sibling::*[1])">false</xsl:when><xsl:otherwise><xsl:for-each select="following-sibling::*[1]"><xsl:call-template name="doImeetMergeConditions"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:variable><xsl:apply-templates/><xsl:if test="$followingingSibMergeConditions='true'"><xsl:apply-templates select="following-sibling::*[1][self::blockquote]" mode="next"/></xsl:if></xsl:template>
<xsl:template name="doImeetMergeConditions"><!-- NOTE IF YOU ADD A NEW CONDITION TO THE NON-MERGE CONDITIONS ABOVE YOU NEED TO ADD IT HERE TOO! --><xsl:choose><xsl:when test="not(self::blockquote)">false</xsl:when><xsl:when test="not(node())">false</xsl:when><xsl:when test="legfragment and not(child::*[2]) and (parent::p[parent::*:bodytext or parent::pgrp or parent::li or parent::fnbody or parent::glp:note or parent::case:judgmentbody or parent::case:appendix] or parent::*:bodytext or parent::li or parent::pgrp or parent::fnbody or parent::glp:note or parent::case:judgmentbody or parent::case:appendix)">false</xsl:when><xsl:when test="parent::case:decisionsummary and $streamID='UK03'">false</xsl:when><xsl:when test="$streamID='AU09' and parent::case:decisionsummary and child::case:embeddedcase/child::case:content">false</xsl:when><xsl:when test="figure or (insert-line and not(child::*[2])) or (parent::glp:note and descendant::inlineobject[@filename = 'leg1.gif' or @filename = 'leg1.png'])">false</xsl:when><xsl:otherwise>true</xsl:otherwise></xsl:choose></xsl:template>
Template
blockquote/link
Documentation
Description
Instructions [common element]
When the element pnum occurs within the
structure blockquote/p/pnum convert by adding the attribute
@inline=”true” on the element
desig for all occurrences of
blockquote/p/desig.
Source XML
<blockquote>
<p>
<pnum count="39">[39]</pnum>
<text>
The case law reveals that there is a preferred approach to the determination of an application
brough pursuant to the provisions of s 79. That approach involves four interrelated steps. Firstly,
the court should make findings as to the identity and value of the property, liabilities and financial resources
of the parties at the date of the hearing.
</text>
</p>
</blockquote>
Target XML
<blockquote>
<p>
<desig value="39" inline="true">[39]</desig>
<text>
The case law reveals that there is a preferred approach to the determination of an application
brough pursuant to the provisions of s 79. That approach involves four interrelated steps. Firstly,
the court should make findings as to the identity and value of the property, liabilities and financial resources
of the parties at the date of the hearing.
</text>
</p>
</blockquote>
Description
Note: This topic is used in numerous conversion instructions for several LBUs. It is a shared
topic rather than duplicated to ensure consistency and accuracy. The xml snippets
contained
in this topic reflect markup needed for the Apollo image handling application. The
UK is the
first LBU to move from Apollo to the Blobstore application for image handling. Therefore,
if
this is a UK conversion instruction document, please refer to the following topics
for
correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE images
(id-CCCC-10542)
inlineobject to ref:inlineobject for
BLOBSTORE images (id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE images
(id-CCCC-10541)
If link element occurs as a child of
blockquote then conversion need to move
ref:lnlink as child of p/text,
i.e, blockquote/link becomes
blockquote/p/text/ref:lnlink.
Source XML : if element link is a child of blockquote
<blockquote>
<h>Notice to mortgagor of mortgaged land of exercise of powers by reason of default</h>
<link filename="ada-09-lta52-plr-form.pdf" type="pdf">Download in PDF</link>
</blockquote>
Target XML : if element link is a child of blockquote
<blockquote>
<h>Notice to mortgagor of mortgaged land of exercise of powers by reason of default</h>
<p>
<text>
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">Download in PDF</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="X-Y-ada-09-lta52-plr-form"/>
<!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value=""/>
<!-- @value populated with SMI obtained from CSSM -->
<!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</text>
</p>
</blockquote>
Note: For handling of link to ref:lnlink, refer the general markup
ref:lnlink section in the CI.
BRT: this rule seems unnecessary - it is already covered by the more generic rule in Rosetta_pnum-LxAdv-desig:
create @inline='true' when no attribute value is present. The fact that the context is blockquote/p/pnum seems irrelevant to the conversion.
Template
level[preceding-sibling::bodytext[not(./child::references[1]) or ./child::references[1]/preceding-sibling::node()]][$streamID
= 'UK15']
Documentation
Description
***********
BRT 11/26/17 the following template causes an ambiguity error with a more generic template - template match="level[1][parent::level]"
WS7051206. This template prevents duplicate seclaw:bodytext entries
Namespace
No namespace
Match
level[preceding-sibling::bodytext[not(./child::references[1]) or ./child::references[1]/preceding-sibling::node()]][$streamID
= 'UK15']
<xsl:template match="level[preceding-sibling::bodytext[not(./child::references[1]) or ./child::references[1]/preceding-sibling::node()]][$streamID = 'UK15']"/>
Template
bodytext/@searchtype
Namespace
No namespace
Match
bodytext/@searchtype
Mode
#default
Import precedence
0
Source
<xsl:template match="bodytext/@searchtype"/>
Template
char-line
Documentation
Description
char-line becomes proc:formchars and
includes the attributes @formchar and
@formcharuse. Attributes
@formchar and @formcharuse are
required attributes in proc:formchars and the values for
these attributes are tokenized in the NewLexis Schema.
Attribute @formchar allows the tokenized values listed
below:
proc:formchars[@formchar="dot"]
proc:formchars[@formchar="rule"]
proc:formchars[@formchar="dbl-rule"]
proc:formchars[@formchar="hypen"]
proc:formchars[@formchar="invisible"]
Below are the values for proc:formchars[@formchar] found
in the source documents and the corresponding mapping in NewLexis.
proc:formchars[@formcharuse="leaderfill"]@formcharuse="leaderfill" means fill the available
space with the formchar. Basically, push the text on each side out to the
margins if possible.
proc:formchars[@formcharuse="other"]
The following are the widths (in points) used for this element in print for each
possible value of @formcharuse. To determine the number
of characters, divide the point value by 6.
proc:formchars[@formcharuse="date"] 66 ->11
proc:formchars[@formcharuse="day"] 36 ->6
proc:formchars[@formcharuse="month"] 48 -> 8
proc:formchars[@formcharuse="year"] 36 -> 6
proc:formchars[@formcharuse="num"] 36 -> 6
proc:formchars[@formcharuse="money"] 42 -> 7
proc:formchars[@formcharuse="address"] 72 -> 12
proc:formchars[@formcharuse="name"] 66 -> 11
proc:formchars[@formcharuse="longname"] 132 ->
22
proc:formchars[@formcharuse="other"] 66 -> 11
Below are the values for proc:formchars[@formcharuse]
found in the source documents and the corresponding mapping in NewLexis.
In the Fab Pipeline, JCite/CFE shall conduct a lookup based on the lnci:content
or the @normcite (if populated) and populate the markup with the additional
keywords needed for cite traversal.
The only markup needed for JCite/CFE is
lnci:cite/lnci:content and optionally
lnci:cite/@normcite. In order to resolve the correct
“pile” target for cite link traversal, either a semantic child content type
element as described below or the lnci:cite/@type
attribute (but not both) must also be present in the output markup.
ci:cite becomes lnci:cite, with all
attribute names and values copied as they occur in the source. Convert all
descendant elements of ci:cite by copying the elements
and their attribute names and values from the ci:
namespace as is into the lnci: namespace. That is,
every descendant of ci:cite that has the form
ci:{element-name} is converted to
lnci:{element-name}. As an example of converting the
descendants of ci:cite into the
lnci: namespace, here is a partial list of the child
elements from Rosetta and what they should be converted to:
ci:casename becomes
lnci:casename
ci:constref becomes
lnci:constref
ci:courtruleref becomes
lnci:courtruleref
ci:decisionref becomes
lnci:decisionref
ci:effdate becomes
lnci:effdate
ci:party1 becomes
lnci:party1
ci:party2 becomes
lnci:party2
ci:procphrase becomes
lnci:procphrase
ci:reglref becomes
lnci:reglref
ci:statinfo becomes
lnci:statinfo
ci:text becomes lnci:text
There are two important exceptions to the converstion instructions given in the
preceding paragraph:
Do not convert any Rosetta-only markup that, if kept, would make the
output invalid.
Drop the start and end tags (the mark-up) for
citefragment and
ci:span but keep the content of these
elements as part of what is converted to the content of
lnci:content.
Drop all instances of
ci:{element-name}/@spanref.
The following are mappings for children of ci:cite:
ci:case becomes
lnci:case
ci:stat becomes
lnci:stat
ci:juryinstr becomes
lnci:juryinstr
ci:reg becomes
lnci:reg
ci:courtrule becomes
lnci:courtrule
ci:sesslaw becomes
lnci:sesslaw
ci:patent becomes
lnci:patent
ci:tmark becomes
lnci:tmark
ci:copyright becomes
lnci:copyright
ci:lawrev becomes
lnci:lawrev
ci:periodical becomes
lnci:periodical
ci:pinpoint becomes
lnci:pinpoint
ci:book becomes
lnci:book
ci:oag becomes
lnci:oag
ci:agencydecision becomes
lnci:agencydecision
ci:constitution becomes
lnci:constitution
ci:annot becomes
lnci:annot
ci:execdoc becomes
lnci:execdoc
ci:admininterp becomes
lnci:admininterp
ci:misc becomes
lnci:misc
ci:form becomes
lnci:form
Given one of the above mappings, the source
ci:cite/@searchtype should be dropped and the target
lnci:cite/@type should be omitted.
In the absence of one of the possible children of ci:cite
listed above, lnci:cite/@type should be populated as
follows:
This will ensure that the correct “context clue” (Product Content Type or
PCT) is populated in the Fab Pipeline so that the resulting citation hyperlink
targets the correct pile.
Handling for AU Journals/Newsitem:
ci:cite with attribute
@type="cite4thisdoc" becomes
lnci:cite with attribute
@type="cite4thisdoc"
Handling for NZ Regulation and NZ Act from services:
If ci:cite@type comes with attribute value
"legref" in source document then conversion needs
to suppressed attribute value in target and convert
ci:cite according to general rule.
Exception: When link is used as intra-document linking
within ci:content.
If the ci:content contains a link
child, the link wrapper markup (not its content) shall be
removed (omit tag and retain content) and the link/@refpt
value shall be moved to lnci:cite/@citeref.
SOURCE XML: ci:content/link
<p> <pnum count="5">[5]</pnum> <refpt
id="20023NZLR_113_p5" type="ext" /> <text>A number of issues were
raised on Bs behalf but may be summarised as follows:</text> ...
</p> … <ci:cite searchtype="CASE-REF"> <ci:case>
<ci:caseref ID="x20023NZLR_113-171" spanref="x20023NZLR_113-171-1">
<ci:reporter value="nzar" country="nz" /> <ci:edition> <ci:date
year="2001" /> </ci:edition> <ci:page num="598" />
</ci:caseref> </ci:case> <ci:content> <citefragment
searchtype="CASE-NAME-REF"> <emph typestyle="it">Auckland District Law
Society v Ford</emph> </citefragment> <citefragment
searchtype="CASE-CITE-REF"> <ci:span
spanid="x20023NZLR_113-171-1">[2001] NZAR 598</ci:span>
</citefragment> at para [ <link
refpt="20023NZLR_113_p5">5</link> ] </ci:content>
</ci:cite>
Target XML
<p> <ref:anchor id="nz_20023NZLR_113_p5" anchortype="global"
/> <desig value="5" inline="true">[5]</desig> <text>A
number of issues were raised on Bs behalf but may be summarised as
follows:</text> ... </p> … <lnci:cite
citeref="20023NZLR_113_p5"> <lnci:case> <lnci:caseref
ID="x20023NZLR_113-171"> <lnci:reporter value="nzar" country="nz" />
<lnci:edition> <lnci:date year="2001" /> </lnci:edition>
<lnci:page num="598" /> </lnci:caseref> </lnci:case>
<lnci:content> <emph typestyle="it">Auckland District Law Society v
Ford</emph> [2001] NZAR 598 at para [ 5 ] </lnci:content>
</lnci:cite>
<xsl:template match="ci:cite"><xsl:choose><xsl:when test="parent::leg:bodytext"><p><text><lnci:cite><xsl:if test="ci:content/link"><xsl:attribute name="citeref" select="ci:content/link/@refpt"/></xsl:if><!-- MDS 2017-05-01 - Added parameter 'childElementName' to match other call.
General ci:* module states to drop value of ci:cite/@searchtype if certain strings are found in first child element local-name.
Previously this first child element local-name value was not being passed. The value is not invalid but it is a diff from the DT documents. --><xsl:apply-templates select="@*"><xsl:with-param name="childElementName" select="local-name(child::*[1])"/></xsl:apply-templates><xsl:apply-templates select="node()"/></lnci:cite></text></p></xsl:when><xsl:otherwise><lnci:cite><!-- JD: 2017-08-31: added for VSTS Issue 342175.
If there is no @type, and no child element aside from <ci:content>, and the parent is case:parallelcite,
then set @type='case'
--><xsl:if test="not(@type) and not(*[not(name()='ci:content')]) and parent::case:parallelcite and $streamID='UK05'"><xsl:attribute name="type" select="'case'"/></xsl:if><!-- MDS - 2017-08-10 - added to address instructions in CI for AU13 --><!-- Awantika: Added AU01 for normcite --><xsl:if test="$streamID=('AU13','AU01','HK09','UK11DN')"><xsl:if test="ci:case/ci:caseref[ci:reporter/@value and ci:volume/@num and ci:edition/ci:date/@year and ci:pinpoint[@targettype='page']/@num] and not(ci:case/ci:caseref/ci:page/@num)"><!-- Done simply to set the context node --><xsl:for-each select="ci:case[1]/ci:caseref"><xsl:attribute name="normcite"><xsl:text>(</xsl:text><xsl:value-of select="ci:edition/ci:date/@year"/><xsl:text>) </xsl:text><xsl:value-of select="ci:volume/@num"/><xsl:text></xsl:text><xsl:value-of select="ci:reporter/@value"/><xsl:text></xsl:text><xsl:value-of select="ci:pinpoint[@targettype='page']/@num"/></xsl:attribute></xsl:for-each></xsl:if></xsl:if><!-- Ankita Singh 12 June 2017: Introducted value of lnci:cite/@type to "cite4thisdoc under jrnl:journalcite as per latest CI of UK09 --><xsl:if test="$streamID = ('UK09', 'NZ08','AU14') and parent::jrnl:journalcite"><xsl:attribute name="type">cite4thisdoc</xsl:attribute></xsl:if><xsl:if test="ci:content/link"><xsl:attribute name="citeref" select="ci:content/link/@refpt"/></xsl:if><xsl:if test="ci:content/remotelink and $streamID = ('NZ14', 'NZ02','AU11','NZ08','AU14')"><xsl:attribute name="citeref" select="ci:content/remotelink[1]/@refpt"/><!-- CSN 8/4/17 added [1] in case there are multiple remotelinks --></xsl:if><!-- 20170721: MCJ: We originally grouped NZ15 into the code for NZ14 and NZ02 but found there are differences in how DT was
handling colons and the leading underscore... so we kept NZ15 apart. It is possibly (likely?) that something
is going to need to change. The NZ15 code attempts to follow the instructions about using a leading underscore
and translating colons to underscores... however, it is not clear whether the target documents have had their
"cite def" processed similarly.
Also, note the added predicate that ensures that there is a remotelink that has @refpt. It is not clear
what should happen if cite:content/remotelink[not(@refpt)] exists... hoping data is good.
--><xsl:if test="ci:content/remotelink[@refpt] and $streamID = ('NZ15')"><!-- First replace any colons with underscores. --><xsl:variable name="translatedCiteRefValue" select="translate(ci:content/remotelink[@refpt][1]/@refpt, ':', '_')"/><!-- Now, check if the value starts with a digit... if so, prepend an underscore. There may be other offending first characters that need to be checked but digits should cover most. --><xsl:variable name="processedCiteRefValue" select="if (matches($translatedCiteRefValue, '^\d')) then concat('_', $translatedCiteRefValue) else $translatedCiteRefValue"/><xsl:attribute name="citeref" select="$processedCiteRefValue"/></xsl:if><!-- MDS 2017-05-01 - Added parameter 'childElementName' to match other call.
General ci:* module states to drop value of ci:cite/@searchtype if certain strings are found in first child element local-name.
Previously this first child element local-name value was not being passed. The value is not invalid but it is a diff from the DT documents. --><xsl:apply-templates select="@*"><xsl:with-param name="childElementName" select="local-name(child::*[1])"/></xsl:apply-templates><xsl:apply-templates select="node()"/></lnci:cite></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="ci:*/@ID"><xsl:param name="increment-caserefid" tunnel="yes"/><xsl:variable name="dupStatus"><xsl:for-each select="parent::*"><xsl:call-template name="amIaDuplicate"/></xsl:for-each></xsl:variable><xsl:choose><xsl:when test="$dupStatus = 'false'"><xsl:attribute name="ID"><xsl:call-template name="normalizeIdString"/><xsl:if test="$increment-caserefid = 'yes'"><xsl:text>_01</xsl:text></xsl:if></xsl:attribute></xsl:when><xsl:otherwise><xsl:message>citation ID for<xsl:value-of select="parent::*"/>was a duplicate and has been removed from the conversion.</xsl:message></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="citefragment | ci:span"><!-- Sudhanshu : 6 june 2017 , requirement for converting ci:span to lnci:span, so using choose scenario. --><xsl:choose><xsl:when test="$streamID = 'CA03' and not(ancestor::leg:officialnum) and not(ancestor::case:parallelcite)"><lnci:span><xsl:apply-templates select="@* | node()"/></lnci:span></xsl:when><xsl:otherwise><xsl:apply-templates/></xsl:otherwise></xsl:choose></xsl:template>
Template
citefragment[parent::ci:content and remotelink[@service = 'DOC-ID']][$streamID = ('AU04',
'AU08')]
Documentation
Description
<xsl:template
match="citefragment[parent::ci:content and remotelink[@service = 'DOC-ID']][$streamID = 'AU04' or $streamID = 'AU08']"> </xsl:template>
Namespace
No namespace
Match
citefragment[parent::ci:content and remotelink[@service = 'DOC-ID']][$streamID = ('AU04',
'AU08')]
<xsl:template match="ci:cite[not(ancestor::case:references) or $streamID='NZ17CC' or $streamID='HK09']/@searchtype" priority="25"><xsl:param name="childElementName"/><xsl:choose><!-- JD: 2017-08-01: NZ06 includes standard module id-CCCC-10268; by my reading ci:cite/@type should not be suppressed, only the value 'legref'
"If ci:cite@type comes with attribute value "legref" in source document then conversion needs to suppressed attribute value in target
and convert ci:cite according to general rule."
Moving this logic to ci:cite/@type, below
--><!--<xsl:when test="$streamID = ('NZ06')"/>--><xsl:when test=" $childElementName = 'case' or $childElementName = 'form' or $childElementName = 'misc' or $childElementName = 'admininterp' or $childElementName = 'execdoc' or $childElementName = 'annot' or $childElementName = 'constitution' or $childElementName = 'agencydecision' or $childElementName = 'oag' or $childElementName = 'book' or $childElementName = 'pinpoint' or $childElementName = 'periodical' or $childElementName = 'lawrev' or $childElementName = 'copyright' or $childElementName = 'tmark' or $childElementName = 'patent' or $childElementName = 'sesslaw' or $childElementName = 'courtrule' or $childElementName = 'reg' or $childElementName = 'juryinstr'"/><xsl:otherwise><xsl:attribute name="type"><xsl:choose><xsl:when test=". = 'LEG-REF'">legislation</xsl:when><xsl:when test=". = 'CASE-REF'">case</xsl:when><xsl:when test=". = 'BOOK-REF'">book</xsl:when><xsl:when test=". = 'BODY-CASE-REF'">case</xsl:when><xsl:when test=". = 'SUMM-CASE-REF'">case</xsl:when><xsl:when test=". = 'EU-REF'">EU-REF</xsl:when></xsl:choose></xsl:attribute></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="ci:cite/@type"><xsl:choose><!--
"Handling for NZ Regulation and NZ Act from services:
If ci:cite@type comes with attribute value "legref" in source document then conversion needs to suppressed attribute value in target
and convert ci:cite according to general rule." --><xsl:when test=".='legref' and $streamID=('NZ05','NZ06')"/><!-- do nothing --><xsl:when test=". = 'legref' or parent::ci:cite[ci:case | ci:stat | ci:juryinstr | ci:reg | ci:courtrule | ci:sesslaw | ci:patent | ci:tmark | ci:copyright | ci:lawrev | ci:periodical | ci:pinpoint | ci:book | ci:oag | ci:agencydecision | ci:constitution | ci:annot | ci:execdoc | ci:admininterp | ci:misc | ci:form]"/><xsl:otherwise><xsl:attribute name="type" select="."/></xsl:otherwise></xsl:choose></xsl:template>
date becomes date comes with following
attributes:
@month becomes @month is
between 01-12. Any numbers outside this range, do not output a
@month.
@day becomes @day is between
01-31. Any numbers outside this range, do not output
@day.
@year becomes @year is 4
digits in length. Any other lengths, do not output
@year.
Note: The format of the content of all date elements must be
in 'YYYY-MM-DD'.
Source XML
<p>
<text>The paragraph below is current to
<emph typestyle="bf">
<date day="11" month="05" year="2010">11 May 2010</date>
</emph>
</text>
</p>
Target XML
<p>
<text>The paragraph below is current to
<emph typestyle="bf">
<date day="11" month="05" year="2010">11 May 2010</date>
</emph>
</text>
</p>
Populating the attribute @normdate
If one or more of the three date values (year, month or day) are absent,
then decision:decisiondate/@normdate should not be populated.
The @normdate should be populated with the values of
date elements within New Lexis.
Using case:decisiondate as an example the ru: case:decisiondate/date/@year,
case:decisiondate/date/@month and case:decisiondate/date/@day concatenated
and separated by a single hyphen. The values of
case:decisiondate/date/@month and case:decisiondate/date/@day should be
padded with zeroes so that they are 2 digits.
Note: The format of the content of all date elements must be
in 'YYYY-MM-DD'.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_date-LxAdv-date.dita
IMPORTANT NOTE: if your stream wants to put the text content of the date element into a <date-text> wrapper, add
the streamID for your stream into the variable 'streamsThatUseDateTextChild' and it will add
the date-text wrapper for that stream
Awantika: Following the above instructions modified the template as in few streams date element is not required
but if date is coming in p/text then date element is created.
Awantika: added stream AU20 to streamsThatUseDateTextChild
<xsl:template match="date"><xsl:variable name="streamsThatUseDateTextChild" select="('HK03','AU01','NZ03','NZ13','CA02DC','UK05','AU20','UK01','UK03','UK11DA','UK12','AU09','UK11DN','UK22CF')"/><xsl:choose><xsl:when test="ancestor::case:dates or $streamID=('CA02DC','AU20','UK11DA','UK12','NZ13','UK11DN','UK22CF')"><xsl:choose><xsl:when test="($streamID=$streamsThatUseDateTextChild and parent::entry)"><date><xsl:apply-templates select="@*|node()"/></date></xsl:when><xsl:when test="($streamID=$streamsThatUseDateTextChild) and node()"><date-text><xsl:apply-templates/></date-text></xsl:when><xsl:when test="not($streamID=$streamsThatUseDateTextChild) and node()"><xsl:apply-templates/></xsl:when><!-- JD: 2017-06-27:
Excluding this template from UK01 under case:hearingdates.
date/@* are applied in the case:hearindates template as any attributes
must be created before creating any nodes (<date-text>, text() content, etc.)
Previously, the 'otherwise' condition would apply to the data below and would
output as @day="06", @month="12" @year="1934; the correct output is
@day="23", @month="01" @year="1935"
<case:hearingdates>
<date day="29" month="11" year="1934"/>
<date day="30" month="11" year="1934"/>
<date day="06" month="12" year="1934"/>
<date day="13" month="12" year="1934">29, 30 November, 6, 13
December 1934</date>
<date day="23" month="01" year="1935">23 January 1935</date>
</case:hearingdates>
--><xsl:when test="$streamID=('UK01','UK03') and (parent::case:hearingdates or parent::case:decisiondate)"><!-- do nothing; date attributes have been handled and there is no child node() to process --></xsl:when><xsl:otherwise><!-- just apply attributes --><xsl:apply-templates select="@*"/></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><date><xsl:call-template name="DATE_attributes"><xsl:with-param name="date"><xsl:copy-of select="."/></xsl:with-param></xsl:call-template><xsl:apply-templates select="node()"/></date></xsl:otherwise></xsl:choose><!--<date xmlns="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/">
<xsl:call-template name="DATE_attributes">
<xsl:with-param name="date">
<xsl:copy-of select="."/>
</xsl:with-param>
</xsl:call-template>
<!-\- Original Target XPath: date -\->
<!-\- Awantika: date becomes date-text if text() is coming else date becomes date in HK03 -\->
<xsl:choose>
<xsl:when test="($streamID=$streamsThatUseDateTextChild) and node()">
<date-text xmlns="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/">
<xsl:apply-templates/>
</date-text>
</xsl:when>
<xsl:when test="not($streamID=$streamsThatUseDateTextChild) and node()">
<xsl:apply-templates/>
</xsl:when>
</xsl:choose>
</date>--></xsl:template>
Template
date[parent::p-limited or ancestor::text][$streamID='UK12']
Namespace
No namespace
Match
date[parent::p-limited or ancestor::text][$streamID='UK12']
<xsl:template match="date[parent::p-limited or ancestor::text][$streamID='UK12']"><date><xsl:copy-of select="@*"/><xsl:apply-templates select="node()"/></date></xsl:template>
Template
deflist
Documentation
Description
deflist becomes deflist
with children as described below:
defitem becomes defitem.
defterm becomes defterm.
defdesc becomes defdesc.
Note: When defitem contains
footenote or fnr as a
direct child, place the converted footnote and
footnote-ref into either
defterm or defdesc. If
the footenote or fnr
occurs either directly before or directly after
defterm, place the footnote in
defterm. If the
footenote or fnr
occurs after defdesc, place the footnote in
defdesc.
Source XML
<deflist> <defitem> <defterm> <emph
typestyle="bf">an entitlement to redundancy pay</emph>
</defterm> <defdesc> <p> <text>includes an
entitlement for an employee to enter into a retention or redeployment
period.</text> </p> </defdesc> </defitem>
</deflist>
Target XML
<deflist> <defitem> <defterm> <emph
typestyle="bf">an entitlement to redundancy pay</emph>
</defterm> <defdesc> <bodytext> <p>
<text>includes an entitlement for an employee to enter into a
retention or redeployment period.</text> </p>
</bodytext> </defdesc> </defitem> </deflist>
If the markup includes defitem/defterm, but no
sibling defitem/defdesc, create a blank
defitem/defdesc element after
defterm but before any other text (such as a
note or annottion). The resulting markup within
deflist/defitem must always include a
defdesc child to create the proper display to
the end user.
Source XML
<deflist> <defitem> <defterm> <emph
typestyle="bf">FWA</emph> </defterm>
<leg:histnote> <p> <text>[def rep Act 174 of 2012 s
3 and Sch 9 item 14, effective 1 January 2013]</text> </p>
</leg:histnote> </defitem> </deflist>
Target XML
<deflist> <defitem> <defterm> <emph
typestyle="bf">FWA</emph> </defterm> <defdesc/>
<note notetype="historical"> <bodytext> <p>
<text>[def rep Act 174 of 2012 s 3 and Sch 9 item 14, effective
1 January 2013]</text> </p> </bodytext>
</note> </defitem> </deflist>
For narrative content that immediately follows
defterm create and wrap the narrative content
within defdesc/bodytext/p/text retaining any
emph.
If there are more than one defterm in the
input documents then it will be handled as:
Source XML
<deflist> <defitem> <p> <text>
<defterm> <refpt id="VIC_ACT_797_BISHOP" type="ext"/>
<emph typestyle="bf">"bishop"</emph> </defterm> or
<defterm> <refpt id="VIC_ACT_797_BISHOPOFADIOCESE"
type="ext"/> <emph typestyle="bf">"bishop of a
diocese"</emph> </defterm> shall mean as to the term
"bishop" the bishop registered under the title of "bishop" under the
provisions of the "<emph typestyle="bf">Successory Trusts Act
1878</emph>" as head of the Church of England in the portion of
Victoria described in the certificate of registrations, and shall
include the administrator of the affairs of the dioceses during the
vacancy of the see; and the term <defterm> <refpt
id="VIC_ACT_797_DIOCESE" type="ext"/> <emph
typestyle="bf">"diocese"</emph> </defterm> shall mean
the portion of Victoria described in such certificate as the diocese
of the person so registered; </text> </p> </defitem>
</deflist>
Target XML
<deflist> <defitem> <defterm>
<ref:anchor id="VIC_ACT_797_BISHOP" anchortype="global"/>
<emph typestyle="bf">"bishop"</emph> </defterm>
<connector>or</connector> <defterm> <ref:anchor
bid="VIC_ACT_797_BISHOPOFADIOCESE" anchortype="global"/> <emph
typestyle="bf">"bishop of a diocese"</emph> </defterm>
<defdesc> <bodytext> <p> <text> shall mean as
to the term "bishop" the bishop registered under the title of "bishop"
under the provisions of the "<emph typestyle="bf">Successory
Trusts Act 1878</emph>" as head of the Church of England in the
portion of Victoria described in the certificate of registrations, and
shall include the administrator of the affairs of the dioceses during
the vacancy of the see; and the term </text> </p>
</bodytext> </defdesc> <defterm> <ref:anchor
id="VIC_ACT_797_DIOCESE" anchortype="global"/> <emph
typestyle="bf">"diocese"</emph> </defterm>
<defdesc> <bodytext> <p> <text> shall mean the
portion of Victoria described in such certificate as the diocese of
the person so registered; </text> </p> </bodytext>
</defdesc> </defitem> </deflist>
Handling of defitem/@id and
defterm/@id.
Note:
For GPL IN Content Stream
defitem/@id becomes
defitem/@xml:id
defterm/@id becomes
defterm/@xml:id
GPL IN Content Stream Source XML
<deflist> <defitem id="S3.i"> <defterm
id="s3.active service">active service</defterm>
<defdesc> <p> <text>, as applied to a person subject
to this Act, means the time during which such
person—</text> </p> </defdesc>
</defitem> </deflist>
GPL IN Content Stream Target XML
<deflist> <defitem xml:id="S3.i"> <defterm
xml:id="s3.active service">active service</defterm>
<defdesc> <bodytext> <p> <text>, as applied to
a person subject to this Act, means the time during which such
person—</text> </p> </bodytext>
</defdesc> </defitem> </deflist>
If the input document has subtitle/defterm scenario then
defterm within a subtitle can be dropped, but
the child element and content of the tag is retained and no text is
dropped.
Source XML having subtitle/defterm scenario:
<subtitle> <defterm> <emph
typestyle="bf">“Greenhouse Gas Storage Act
2009”</emph> </defterm> </subtitle>
Target XML
<subtitle> <emph
typestyle="bf">“Greenhouse Gas Storage Act
2009”</emph> </subtitle>
<xsl:template match="defitem[$streamID = ('UK06','UK07')]"><defitem><xsl:apply-templates select="@* | defterm"/><xsl:choose><!-- when there is a defdesc apply it --><!-- TODO: find/test p/text/defdesc branch to ensure nothing lost --><xsl:when test="defdesc | p/text/defdesc"><xsl:apply-templates select="defdesc | p/text/defdesc"/></xsl:when><!-- when there is no defdesc and text() content that should become the definition --><xsl:when test="not(defdesc | p/text/defdesc)"><!-- JL added empty bodytext wrapper to validate to the target schemas --><defdesc><bodytext><xsl:variable name="defvalue" select="./text()[preceding-sibling::defterm and following-sibling::leg:histnote]"/><xsl:apply-templates select="node() except (footnote | fnr | defterm)"/></bodytext></defdesc></xsl:when></xsl:choose></defitem></xsl:template>
JD: Attempting to create single defitem template rule,
limiting to specific streams for now.
Handles both <defitem> with <defterm> and <defdesc> and the
condition where <defitem> has a <defterm> but no <defdesc>, but has text() containing the definition.
Example:
<defitem id="IPP.ICON.JRCTL.ART1.OFFICE">
<defterm>
<refpt id="IPP.ICON.JRCTL.ART1.OFFICE" type="ext"/>
<emph typestyle="bf">Office</emph>
</defterm>
means the agency entrusted by a Member State with the registration of marks;
</defitem>
<xsl:template match="defitem[$streamID = ('AU11', 'NZ06', 'NZ10', 'AU18')]"><defitem><xsl:choose><xsl:when test="$streamID='AU18' and ./@id = descendant::refpt/@id"/><xsl:otherwise><xsl:apply-templates select="@id"/></xsl:otherwise></xsl:choose><xsl:apply-templates select="@* except @id | defterm"/><!-- create <connector> if required --><xsl:apply-templates select="text()[normalize-space(replace(., '^[\t\p{Zs}]+$', '')) !='' and parent::defitem and preceding-sibling::defterm and (following-sibling::defdesc | following-sibling::leg:histnote[$streamID='AU18'])]"/><xsl:choose><!-- when there is a defdesc apply it --><!-- TODO: find/test p/text/defdesc branch to ensure nothing lost --><xsl:when test="defdesc | p/text/defdesc"><xsl:apply-templates select="defdesc | p/text/defdesc"/></xsl:when><!-- JD: 2017-12-01: found validation error and DT mismatch after SVN update. Adding this when but limiting to affected stream for now. May be more broadly applicable. --><xsl:when test="glp:note and not(defdesc | p/text/defdesc) and normalize-space(replace(., '^[\t\p{Zs}]+$', '')) !='' and $streamID='NZ06'"><xsl:apply-templates select="node() except (footnote | fnr | defterm | leg:histnote)"/></xsl:when><!-- when there is no defdesc and text() content that should become the definition --><xsl:when test="not(defdesc | p/text/defdesc) and normalize-space(replace(., '^[\t\p{Zs}]+$', '')) !=''"><defdesc><bodytext><p><text><xsl:apply-templates select="node() except (footnote | fnr | defterm | leg:histnote)"/></text></p></bodytext></defdesc><!--<xsl:apply-templates select="child::leg:histnote[$streamID='AU18']"/>--></xsl:when><!-- otherwise nothing to do (e.g., text() is all whitespace--><xsl:otherwise/></xsl:choose><!-- now apply templates to any element other than defterm --><xsl:apply-templates select="* except (defterm | defdesc | p/text/defdesc | glp:note)"/></defitem></xsl:template>
Template
text()[parent::defitem and preceding-sibling::defterm and following-sibling::defdesc][not(matches(.,
'^[\t\p{Zs}]+$'))]
Documentation
Description
JD: 2017-07-21: although not mentioned in the instructions, id-CCCC-10277 provides a special use case and example for <connector>
if text() contains anything but whitespace (tab, nonbreaking space, line feed) then wrap contents in <connector>
Namespace
No namespace
Match
text()[parent::defitem and preceding-sibling::defterm and following-sibling::defdesc][not(matches(.,
'^[\t\p{Zs}]+$'))]
Mode
#default
Import precedence
0
Source
<xsl:template match="text()[parent::defitem and preceding-sibling::defterm and following-sibling::defdesc][not(matches(., '^[\t\p{Zs}]+$'))]"><connector><xsl:value-of select="."/></connector></xsl:template>
Template
text()[parent::defitem and preceding-sibling::defterm][matches(., '^[\t\p{Zs}]+$')]
Documentation
Description
if there is a space char (including nonbreaking) suppress it
Namespace
No namespace
Match
text()[parent::defitem and preceding-sibling::defterm][matches(., '^[\t\p{Zs}]+$')]
Mode
#default
Import precedence
0
Source
<xsl:template match="text()[parent::defitem and preceding-sibling::defterm][matches(., '^[\t\p{Zs}]+$')]"/>
If the source XML has the scenario p/text/deflist then drop the text tag, i.e., p/text/deflist becomes p/deflist.
Source XML
<p>
<text>
<deflist>
<defitem>
<p>
<text>
<defterm><emph typestyle="bf">Australian Standard 1885.1</emph></defterm> means
Australian Standard 1885, being that standard as approved 20 March 1990 and published 11
June 1990 entitled ‘Workplace injury and disease recording standard’.
</text>
</p>
</defitem>
</deflist>
</text>
</p>
Target XML
<p>
<deflist>
<defitem>
<defterm>
<emph typestyle="bf">Australian Standard 1885.1</emph>
</defterm>
<defdesc>
<bodytext>
<p>
<text>means Australian Standard 1885, being that
standard as approved 20 March 1990 and published 11 June 1990 entitled
“Workplace injury and disease recording standard”.
</text>
</p>
</bodytext>
</defdesc>
</defitem>
</deflist>
</p>
Special Scenario: If source document having
"p/text/deflist" with running text which is comes before
starting of deflist element and under
text markup then conversion should not drop
text markup in target and retain running text under
text and closing of text markup before
deflist in target document. Refer below source and target
examples:
MDS Be sure to include Rosetta_designum-Chof-desig-LxAdv-desig.xsl in any driver that includes this module.
****************
Awantika: desig sibling of title becomes toc-ref in AU01
Awantika: to resolve the ambiguity between Rosetta_desig-LxAdv-desig_ref.para and Rosetta_desig-LxAdv-desig updated the template match witn not(parent::p)
as if desig is in the heading then it will convert ot desig if inside p then it will convert to ref:para. Removed toc-ref as it will bw mapped in toc module.
<xsl:template match="desig[not(parent::p)]"><!-- Original Target XPath: desig --><desig><!-- Awantika: created desig @value to get the value from designum and should not get the value of designum in text of desig
rather only desiglabel text is populated inside desig--><xsl:choose><xsl:when test="$streamID='AU20'"><xsl:attribute name="value"><xsl:value-of select="child::designum"/></xsl:attribute><xsl:apply-templates select="node() except designum"/></xsl:when><!-- $streamID=('NZ11','AU10')
when @id appears on designum, get error. I suspect any stream would get this error, but
because this is common I opted for using stream ID. If you get this error, consider this.
Description: XTDE0410: An attribute node (xml:id) cannot be created after a child of the containing element."
--><xsl:when test="$streamID=('NZ11','AU10') and designum"><xsl:apply-templates select="@value | @inline | designum/@id"/><xsl:apply-templates select="*"/></xsl:when><xsl:when test="$streamID=('NZ11','AU10') and not(designum)"><xsl:apply-templates select="@value | @inline"/><xsl:apply-templates select="node()"/></xsl:when><xsl:otherwise><xsl:apply-templates select="@value | @inline | node()"/></xsl:otherwise></xsl:choose></desig></xsl:template>
When combining desiglabel and designum
the whitespace between should be retained. E.g "Part " and
"1 " becomes "Part
1 ".
For UK Streams: If source does not have whitespace between, then
insert single space. If contents of source elements are wrapped in
emph then space is required at end of label content or
start of number content; if neither space present, insert single space at end of
label content.
<xsl:template match="desiglabel"><xsl:choose><xsl:when test="parent::desigrange and $streamID='UK06'"><desig><xsl:apply-templates select="node() except(refpt)"/><!-- MDS created in HK04 but not applicable until UK06, 07, 12. Retest with live data. --><xsl:choose><xsl:when test="following-sibling::designum and (not(ends-with(., ' ')) or not(starts-with(following-sibling::designum, ' ')))"><xsl:text></xsl:text></xsl:when><xsl:when test="emph and following-sibling::designum/emph"><xsl:choose><xsl:when test="(not(ends-with(emph, ' ')) or not(starts-with(following-sibling::designum/emph, ' ')))"><xsl:text></xsl:text></xsl:when><xsl:otherwise/></xsl:choose></xsl:when><xsl:otherwise/></xsl:choose><!--<xsl:apply-templates select="@* | node()"/>--><xsl:apply-templates select="following-sibling::designum"/></desig></xsl:when><xsl:otherwise><xsl:apply-templates select="node() except(refpt)"/><!-- MDS created in HK04 but not applicable until UK06, 07, 12. Retest with live data. --><xsl:choose><xsl:when test="following-sibling::designum and (not(ends-with(., ' ')) or not(starts-with(following-sibling::designum, ' ')))"><xsl:text></xsl:text></xsl:when><xsl:when test="emph and following-sibling::designum/emph"><xsl:choose><xsl:when test="(not(ends-with(emph, ' ')) or not(starts-with(following-sibling::designum/emph, ' ')))"><xsl:text></xsl:text></xsl:when><xsl:otherwise/></xsl:choose></xsl:when><xsl:otherwise/></xsl:choose></xsl:otherwise></xsl:choose></xsl:template>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_designum-Chof-desig-LxAdv-desig.dita
JL note from dita for HK05
*********************************************************************
<note>If <sourcexml>dict:body/heading/desig/designum</sourcexml> have
<sourcexml>refpt</sourcexml> as child then move target mapping of
<sourcexml>refpt</sourcexml> to
<targetxml>dict:body/dict:defitem/tei:entry/tei:form/tei:orth/ref:anchor</targetxml></note>
**********************************************************************
******************************************************************************************
IMPORTANT NOTE!
The template for desig (match = "desig") SHOULD NOT BE IN THIS MODULE.
That template (which used to be here) has a conflict with the module for desig :
/XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_desig-LxAdv-desig.xsl
Having the template for desig in this module caused over 1500 ambiguity errors in one test run.
If you need a template for desig to go with designum, which you probably do,
please import the desig module for generic handling
(/XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_desig-LxAdv-desig.xsl)
into your driver if it is not already there. If you need specialized handing, please
create a separate module for the desig template.
Thanks, JL
**********************************************************************************************
<xsl:template match="desig/designum"><xsl:choose><xsl:when test="$streamID='HK05' and parent::desig/parent::heading/parent::source_dict:body"><xsl:apply-templates select="@* | node() except refpt"/><xsl:apply-templates select="refpt" mode="hk05desig"/></xsl:when><!-- $streamID=('NZ11','AU10')
when @id appears on designum, get error. I suspect any stream would get this error, but
because this is common I opted for using stream ID. If you get this error, consider this.
Description: XTDE0410: An attribute node (xml:id) cannot be created after a child of the containing element."
--><xsl:when test="$streamID=('NZ11','AU10')"><xsl:apply-templates select="node() except refpt"/></xsl:when><xsl:otherwise><!-- <xsl:apply-templates select="@* | node()"/>--><!-- Awantika: ref:anchor is not allowed in desig --><xsl:apply-templates select="@* | node() except refpt"/></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="dispformula"><!-- Original Target XPath: formula --><formula><xsl:apply-templates select="@* | node()"/></formula></xsl:template>
Template
edpnum
Documentation
Description
Instructions [common element]
If edpnum does not occur as a sibling of
desig, then edpnum becomes
desig.
If edpnum and desig occur as
siblings, then edpnum becomes
altdesig. This scenario can occur in elements such as
leg:heading.
In either case, preserve source document order in the output.
Source XML
<heading>
<edpnum>[LEN 5638]</edpnum>
<title>EPA v Multiplex Constructions Pty Ltd</title>
</heading>
Target XML
<heading>
<desig>[LEN 5638]</desig>
<title>EPA v Multiplex Constructions Pty Ltd</title>
</heading>
Source XML - sibling edpnum and
desig
<leg:heading inline="true">
<edpnum>[78,025]</edpnum>
<title searchtype="SECT-TITLE">Children's evidence to which this Act applies</title>
<desig searchtype="SECT-NUM"><designum>6</designum></desig>
</leg:heading>
Target XML - sibling edpnum and
desig
<heading inline="true">
<altdesig>[78,025]</altdesig>
<title>Children's evidence to which this Act applies</title>
<desig>6</desig>
</heading>
Note: If pnum and edpnum occur as siblings,
then edpnum becomes altdesig This scenario
can occur in elements such as p(applicable for UK22CS and
UK06).
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_edpnum-LxAdv-desig.dita
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_email-LxAdv-email.dita
emph becomes emph.
@typestyle values are tokenized. These are given below:
@typestyle="bf" bold.
@typestyle="biu" bold, italic and underline.
@typestyle="bu" bold underline.
@typestyle="caps" capital characters.
@typestyle="dbl-un" double underline.
@typestyle="grayscal" grayscale.
@typestyle="hi" highlighted.
@typestyle="ib" italic and bold.
@typestyle="it" italic.
@typestyle="iu" italic underline.
@typestyle="ro" roman.
@typestyle="smcaps" small caps.
@typestyle="un" underline.
@typestyle="inherit" inherit.
Children of emph should be processed.
Source XML
<emph typestyle="ro">(1)</emph>
Target XML
<emph typestyle="ro">(1)</emph>
Note: If emph/emph has the same
@typestyle value then remove one
emph element.
Note:
heading/title/emph becomes heading/title. That
is, the emph start-tag and end-tag (but not the content) are dropped, and the content
becomes part of the target parent title element.
Source XML: When source is having emph and PCDATA under heading/title than in that case the emph element get dropped from target and its content along with the PCDATA will be put
directly under title element.
<heading>
<title>
<emph typestyle="it">R</emph>(on the application of Green) v Police Complaints Authority
<fnr fnrtoken="d30e128" fntoken="d30e1108">13</fnr>
</title>
</heading>
Target XML
<heading>
<title>R (on the application of Green) v Police Complaints Authority
<footnote-ref anchoridref="d30e128">
<ref:anchor id="d30e1108"/>
<label>13</label>
</footnote-ref>
</title>
</heading>
<xsl:template match="emph" name="emph-generic"><xsl:choose><!-- pass through when parent is title with heading parent or parent is emph with parent title with parent title--><xsl:when test="(child::copyright and parent::disclaimer and $streamID='UK11DA')"><xsl:element name="emph"><xsl:copy-of select="@typestyle"/><xsl:apply-templates select="@*|node() except copyright"/></xsl:element></xsl:when><xsl:when test="parent::title/parent::heading[$streamID='UK07']"><xsl:element name="emph"><xsl:copy-of select="@typestyle"/><xsl:apply-templates/></xsl:element></xsl:when><!-- 2016-10-24 - MDS: Pass through when child outputting as URL in UK11DA --><xsl:when test="parent::remotelink[$streamID='UK11DA']"><xsl:apply-templates select="node()"/></xsl:when><!-- JD: excluding the dropping of <emph> within title for streams to match DT output.
There is no instruction to remove <emph> from <title> in
emph to emph (id-CCCC-10316)
title to title (id-CCCC-10479)
--><xsl:when test="$streamID=('AU11','NZ06','NZ08','NZ18','NZ11','NZ13','AU14') and (parent::title/parent::heading |parent::emph/parent::title/parent::heading | parent::title/parent::leg:heading |parent::emph/parent::title/parent::leg:heading) and (not(preceding-sibling::text()) or not(following-sibling::text())) "><!-- not in CI, but match DT output: when parent emph is same, merge --><xsl:choose><!-- pass through when there is a parent emph with the same @typestyle --><xsl:when test="@typestyle=parent::emph/@typestyle"><xsl:apply-templates/></xsl:when><xsl:otherwise><xsl:element name="emph"><xsl:copy-of select="@typestyle"/><xsl:apply-templates/></xsl:element></xsl:otherwise></xsl:choose></xsl:when><xsl:when test="(parent::title/parent::heading |parent::emph/parent::title/parent::heading | parent::title/parent::leg:heading |parent::emph/parent::title/parent::leg:heading) and (not(preceding-sibling::text()) or not(following-sibling::text())) "><xsl:apply-templates/></xsl:when><!--skip over emphasis if only refpt at child --><xsl:when test="refpt and not(normalize-space(string-join(text(), '')))[$streamID!='CA10']"><!-- suppress --></xsl:when><xsl:when test="@typestyle=parent::emph/@typestyle"><!-- pass through when there is a parent emph with the same @typestyle --><xsl:apply-templates/></xsl:when><xsl:when test="child::inlineobject and not(parent::h) and $streamID='AU08'"><xsl:apply-templates/></xsl:when><!-- The handling for AU06 could be shareable but keeping as stream-specific until we have more testing. --><!-- JD: 2017-07-19: tested with UK01 too (added); this appears to be working properly.
Note that the following 'when' drops text() that should be emphasized --><xsl:when test="child::inlineobject and not(parent::h) and ($streamID=('AU06','AU04','UK01','HK02'))"><!-- this attempts to allow the emphasis markup to be retained around some output but not around others. --><!-- keep current emph node to get to later. --><xsl:variable name="me" select="."/><xsl:for-each-group select="node()" group-adjacent="if (self::inlineobject) then 0 else 1"><xsl:choose><!-- anything here is not kept within emphasis. --><xsl:when test="current-grouping-key()=0"><xsl:apply-templates select="current-group()"/></xsl:when><!-- the otherwise condition allows the retention of the emphasis markup. --><xsl:otherwise><emph><!-- build @typestyle using the input node's @typestyle. --><xsl:copy-of select="$me/@typestyle"/><xsl:apply-templates select="current-group()"/></emph></xsl:otherwise></xsl:choose></xsl:for-each-group></xsl:when><!-- JD: Note that this template will drop any text() appearing in emph, as in "Declared takings (F)"
<emph typestyle="bf">Declared takings (F)
<inlineobject type="image" mimetype="image/gif" filename="VATC_19761_1.gif"/>
</emph>
--><xsl:when test="child::inlineobject and not(parent::h) and not ($streamID='UK09')"><!-- AS: for emph/inlineobject in DT GDS it's emph/ref:inlineobject but in CI it's figure/ref:inlineobeject --><xsl:element name="figure"><xsl:apply-templates/></xsl:element></xsl:when><xsl:when test="child::sub/child::inlineobject"><xsl:apply-templates/></xsl:when><xsl:when test="ancestor::ci:content[$streamID='CA02DS']"><xsl:apply-templates/></xsl:when><xsl:otherwise><xsl:element name="emph"><xsl:copy-of select="@typestyle"/><xsl:apply-templates/></xsl:element></xsl:otherwise></xsl:choose></xsl:template>
Template
emph/@typestyle
Documentation
Description
suppress to get rid of errors as @typestyle already handled. JL
Namespace
No namespace
Match
emph/@typestyle
Mode
#default
Import precedence
0
Source
<xsl:template match="emph/@typestyle"/>
Template
emph[parent::case:judges and ./@typestyle='smcaps']
Documentation
Description
Instructions [common element]
When emph is inside case:judges and @typestyle="smcaps" then conversion need to omit emph tag.
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_emph-Chof-case.judges-LxAdv-omit_tag.dita
20170424: MCJ: Handled to match the conversion instructions. However, it feels like this would be better placed in a single module that handles emph to avoid spreading the instructions
across many modules.
20170424: MCJ: Also don't know if the XSLT that is embedded in the DITA needs to be changed.
Namespace
No namespace
Match
emph[parent::case:judges and ./@typestyle='smcaps']
Mode
#default
Import precedence
0
Source
<xsl:template match="emph[parent::case:judges and ./@typestyle='smcaps']"><xsl:apply-templates/></xsl:template>
Template
heading/title/emph
Documentation
Description
Instructions [common element]
heading/title/emph becomes heading/title. That
is, the emph start-tag and end-tag (but not the content) are dropped, and the content becomes
part of the target parent title element.
Source XML: When source is having emph and PCDATA under heading/title than in that case the emph element get dropped from target and its content along with the PCDATA will be put
directly under title element.
<heading>
<title>
<emph typestyle="it">R</emph>(on the application of Green) v Police Complaints Authority
<fnr fnrtoken="d30e128" fntoken="d30e1108">13</fnr>
</title>
</heading>
Target XML
<heading>
<title>R (on the application of Green) v Police Complaints Authority
<footnote-ref anchoridref="d30e128">
<ref:anchor id="d30e1108"/>
<label>13</label>
</footnote-ref>
</title>
</heading>
Template
refpt[ following-sibling::node()[1][self::remotelink[matches(@refpt , '^.*FN(\d+)\-R$')
or matches(@refpt , '^.*FN(\d+)$')]] or preceding-sibling::node()[1][self::remotelink[matches(@refpt
, '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]] or preceding-sibling::node()[1][self::text()[matches(.
, '^\s+$')] [preceding-sibling::node()[1][self::remotelink[matches(@refpt
, '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]]]] or following-sibling::node()[1][self::text()[matches(.
, '^\s+$')] [following-sibling::node()[1][self::remotelink[matches(@refpt
, '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]]]] ]
Documentation
Description
Instructions [common element]Handling of Footnote references and Endnotes
Whenever refpt and remotelink occurs
as adjacent siblings, this indicates they are footnote refernces and are linked to
endnotes within the document or outside the document.
Check for the remotelink/@refpt value, if it is
"*_FN#", then create a footnote-ref. If it is
"*_FN#-R" then create the footnote as child of
endnotes.
The l around endnotes is converted to
endnotes the li around a
endnote is removed when refpt and
remotelink is converted to
footnote/@role="endnote".
Note: endnote references can be found at any place in the same document or in
another document.
Note: We are only converting refpt and
remotelink to
footnote/@role="endnote" within
primlaw:level/@leveltype="endnote" when they occurs
as adjacent siblings.
Note: footnote-ref/@reftype will be set to "global" if refpt/@id="ext".
The attribute value's for refpt/@id and
remotelink/@refpt are duplicated within the source
document i.e.,
refpt/@id (footnote refernce) and
remotelink/@refpt (endnote) will be same. and
remotelink/@refpt (footnote refernces) and
refpt/@id (endnote) will be same.
Note: The endnote and associated endnote references may be in different
documents.
Footnote-ref: Every occurance of refpt and
remotelink will become
footnote-ref in output. Populate
footnote-ref as follows:
footnote-ref/@role will always be set to
"endnote".
Create footnote:ref/ref:locator/ref:locator-key
with attributes and children as follows:
If @remotekey1="DOC-ID" then
ref:key-name/@name will have the
value "DOC-ID".
key-value/@value will be the
value of @dpsi followed by hyphen
and concatenated with @refpt or
@remotekey2, which ever is
present (if both are present, use
@remotekey2).
If @remotekey1="REFPTID" then
ref:key-name/@name will have the
value "DOC-ID".
ref:key-value/@value will be the
value of @dpsi followed by hyphen
and concatenated with
@docidref.
Create ref:locator/@anchoridref
with value from @refpt or
@remotekey2, which ever is
present (if both are present, use
@refpt).
Endnote: Every occurance of refpt and
remotelink will become footnote as
a child of endnotes which is the container element for all
the converted endnotes. Populate each footnote created within
endnotes as follows:
footnote/@role will always be set to "endnote".
refpt/@id becomes
footnote/ref:anchor/@id.
remotelink/sup becomes
footnote/label.
remotelink/sub becomes
footnote/label.
remotelink attributes are converted as follows:
Create
footnote/ref:returnreference/ref:locator/ref:locator-key
with attributes and children as follows:
If @remotekey1="DOC-ID" then
ref:key-name/@name will have the
value "DOC-ID".
key-value/@value will be the
value of @dpsi followed by hyphen
and concatenated with @refpt or
@remotekey2, which ever is
present (if both are present, use
@remotekey2).
If @remotekey1="REFPTID" then
ref:key-name/@name will have the
value "DOC-ID".
ref:key-value/@value will be the
value of @dpsi followed by hyphen
and concatenated with
@docidref.
Create ref:locator/@anchoridref
with value from @refpt or
@remotekey2, which ever is
present (if both are present, use
@refpt).
Note: If remotelink/@dpsi is not present, use value
from docinfo:dpsi/@id-string or capture value
from the LBU manifest file.
Note: ref:locator/@anchoridref that begins with a
number must have an underscore added at start. Also apply other identifier data type
format as
used for xml:id and ref:anchor/@id
(e.g. change colon to underscore). Refer to the section titled "Identifiers to ID
Data Type -
Handling Pattern Restrictions", if that section exists in this CI.
Note: All elements between the l and the nearest ancestor
leg:level are not converted as usual. For example,
leg:endmatter/leg:level/leg:level-vrnt/leg:levelbody/leg:bodytext/l/li
becomes primlaw:level/endnotes/footnote with appropriate
attributes.
Note: For the Xpath leg:bodytext/glp:note/l/li, all elements between l and the nearest
ancestor glp:note are not converted as usual and the target endnote will be sibling of
primlaw:bodytext. The target Xpath will be primlaw:level/endnotes/footnote. Refer below source XML 3 and target XML 3.
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_endnote-LxAdv-endnote.dita
JL 20171109: white-space proofed the test, with fallback to traditional remotelink processing.
Also tightened up the criteria for refpt and remotelink matching to include the @refpt FN string,
so the processing for refpt or remotelink will resort to default handling if all the criteria are not met.
This fixes a few production webstars
Namespace
No namespace
Match
refpt[ following-sibling::node()[1][self::remotelink[matches(@refpt , '^.*FN(\d+)\-R$')
or matches(@refpt , '^.*FN(\d+)$')]] or preceding-sibling::node()[1][self::remotelink[matches(@refpt
, '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]] or preceding-sibling::node()[1][self::text()[matches(.
, '^\s+$')] [preceding-sibling::node()[1][self::remotelink[matches(@refpt
, '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]]]] or following-sibling::node()[1][self::text()[matches(.
, '^\s+$')] [following-sibling::node()[1][self::remotelink[matches(@refpt
, '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]]]] ]
Mode
#default
Import precedence
0
Priority
30
Source
<xsl:template match="refpt[ following-sibling::node()[1][self::remotelink[matches(@refpt , '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]] or preceding-sibling::node()[1][self::remotelink[matches(@refpt , '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]] or preceding-sibling::node()[1][self::text()[matches(. , '^\s+$')] [preceding-sibling::node()[1][self::remotelink[matches(@refpt , '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]]]] or following-sibling::node()[1][self::text()[matches(. , '^\s+$')] [following-sibling::node()[1][self::remotelink[matches(@refpt , '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]]]] ]" priority="30"><!-- do nothing --></xsl:template>
Template
remotelink[matches(@refpt , '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]
[preceding-sibling::node()[1][self::refpt] or following-sibling::node()[1][self::refpt]
or preceding-sibling::node()[1][self::text()[matches(. , '^\s+$')][preceding-sibling::node()[1][self::refpt]]]
or following-sibling::node()[1][self::text()[matches(. , '^\s+$')][following-sibling::node()[1][self::refpt]]]
]
Documentation
Description
note: this logic will need to be merged with "remotelink"
JL made it node rather than element because there can be intervening text, and we don't want to do
this with intervening text.
Namespace
No namespace
Match
remotelink[matches(@refpt , '^.*FN(\d+)\-R$') or matches(@refpt , '^.*FN(\d+)$')]
[preceding-sibling::node()[1][self::refpt] or following-sibling::node()[1][self::refpt]
or preceding-sibling::node()[1][self::text()[matches(. , '^\s+$')][preceding-sibling::node()[1][self::refpt]]]
or following-sibling::node()[1][self::text()[matches(. , '^\s+$')][following-sibling::node()[1][self::refpt]]]
]
endnotes become a bump-up within primlaw:level (within and outside of glp:note) as well as leg:comntry
Since I coded this for a dictionary stream, it hasn't been tested yet. Someone with a
legislation stream should test it and sign off here. JL
JD: 2017-08-10: works for legislation stream NZ06; see notes in /modules/glp/Rosetta_glp.note-LxAdv-note.xsl
<xsl:template match="leg:bodytext" priority="30"><!-- this will handle annotations interspersed with primlaw:bodytext elements in document order --><xsl:for-each-group select="*" group-adjacent="if (self::leg:comntry or self::l[li[lilabel[refpt][remotelink][not(child::*[3])]]][not(child::*[not(self::li[lilabel[refpt][remotelink][not(child::*[3])]])])][not(@virtual-nesting)] or self::glp:note[l[li[lilabel[refpt][remotelink][not(child::*[3])]]][not(child::*[not(self::li[lilabel[refpt][remotelink][not(child::*[3])]])])][not(@virtual-nesting)]] ) then 0 else 1"><xsl:choose><xsl:when test="current-grouping-key()=0"><xsl:for-each select="current-group()"><xsl:choose><xsl:when test="self::glp:note"><xsl:apply-templates select="*"/></xsl:when><xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise></xsl:choose></xsl:for-each></xsl:when><xsl:otherwise><xsl:choose><xsl:when test="$streamID='AU19LA' or ($streamID=('NZ12') and not(ancestor::legfragment))"><admindoc:bodytext><xsl:apply-templates select="parent::leg:bodytext/@*"/><xsl:for-each select="current-group()"><xsl:apply-templates select="."/></xsl:for-each></admindoc:bodytext></xsl:when><xsl:when test="$streamID='AU18' and not(ancestor::legfragment)"><xsl:choose><xsl:when test="parent::leg:bodytext[preceding-sibling::leg:level]"><xsl:element name="admindoc:level"><xsl:attribute name="leveltype"><xsl:text>unclassified</xsl:text></xsl:attribute><admindoc:bodytext><xsl:apply-templates select="parent::leg:bodytext/@*"/><xsl:for-each select="current-group()"><xsl:apply-templates select="."/></xsl:for-each></admindoc:bodytext></xsl:element></xsl:when><xsl:otherwise><admindoc:bodytext><xsl:apply-templates select="parent::leg:bodytext/@*"/><xsl:for-each select="current-group()"><xsl:apply-templates select="."/></xsl:for-each></admindoc:bodytext></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><primlaw:bodytext><xsl:apply-templates select="parent::leg:bodytext/@*"/><xsl:for-each select="current-group()"><xsl:apply-templates select="."/></xsl:for-each></primlaw:bodytext></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:for-each-group></xsl:template>
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
figure becomes figure. The children of
figure are handled as follows:
caption becomes caption. The
content inside caption should be mapped to
caption/p/text.
link becomes
ref:lnlink[@service="ATTACHMENT"]. See General
Markup section for details.
Note: In NewLexis figure is not allowed within
blockquote element. If figure
element is a direct child of blockquote element and
figure element does not have any sibling element in
blockquote element, then drop the outer
blockquote element in NewLexis.
Note:
figure/glp:note/h becomes
figure/note/bodytext/h in NewLexis.
If figure/p becomes
figure/note/bodytext/p in NL conversion.
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-1484985-RSOS-913-CURRENT-0001"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
Example 3
<figure>
<caption>Head of PSL IP&IT</caption>
<inlineobject filename="Lawrence Milner.jpg"/>
</figure>
becomes
<figure>
<caption>
<p>
<text>Head of PSL IP&IT</text>
</p>
</caption>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-Lawrence Milner"/>
<!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/>
<proc:param name="object-smi" value=""/>
<!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
Note: figure/p/text/inlineobject becomes
figure/ref:inlineobject, omit p/text from output if
figure/p/text/ having only
inlineobject as single child and no PCDATA within
text.
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-eu-tracker_band_of_flags"/>
<!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/>
<proc:param name="object-smi" value=""/>
<!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
Example 5. child link
<figure>
<link type="image" filename="HSWT-THS-W11037A.tif">Click here to view image</link>
</figure>
becomes
<figure>
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">Click here to view image</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="X-Y-HSWT-THS-W11037A"/>
<!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="image"/>
<proc:param name="attachment-smi" value=""/>
<!-- @value populated with SMI obtained from CSSM -->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</figure>
<xsl:template match="caption[not(preceding-sibling::*[1][self::caption])]"><xsl:element name="caption"><xsl:element name="p"><xsl:element name="text"><xsl:apply-templates/></xsl:element></xsl:element><xsl:apply-templates select="following-sibling::*[1][self::caption]" mode="caption_wrapper"/><!-- JD: 2017-11-13: apply 'caption_wrapper' mode for follwing p elements that do not contain links/inlineobjects (Note: not limited to first sibling p). Limited to UK08OR for now. --><xsl:apply-templates select="following-sibling::*[self::p[not(text/link or text/inlineobject)]][$streamID='UK08OR']" mode="caption_wrapper"/></xsl:element></xsl:template>
Template
p[not(text/inlineobject) or not(text/link)][preceding-sibling::*[self::caption]][$streamID='UK08OR']caption_wrapper
Documentation
Description
JD: 2017-11-13: new mode 'caption_wrapper' for p siblings of caption that do not contain link or inlineobject (Note: not limited to first sibling p). Limited to UK08OR for now.
Namespace
No namespace
Match
p[not(text/inlineobject) or not(text/link)][preceding-sibling::*[self::caption]][$streamID='UK08OR']
Template
figure/p[preceding-sibling::*[self::caption]][not(text/inlineobject or text/link)][$streamID='UK08OR']
Documentation
Description
JD: 2017-11-13: suppress p when contents have been processed by mode 'caption_wrapper' for p siblings of caption that do not contain link or inlineobject (Note: not limited to first sibling p). Limited to UK08OR for now.
Namespace
No namespace
Match
figure/p[preceding-sibling::*[self::caption]][not(text/inlineobject or text/link)][$streamID='UK08OR']
<xsl:template match="figure/p[preceding-sibling::*[self::caption]][not(text/inlineobject or text/link)][$streamID='UK08OR']" priority="21"/>
Template
figure/p
Namespace
No namespace
Match
figure/p
Mode
#default
Import precedence
0
Priority
20
Source
<xsl:template match="figure/p" priority="20"><xsl:for-each-group select="*" group-adjacent="if (self::heading or self::inlineobject or self::link or self::text[not(child::*[not(self::heading or self::inlineobject or self::link)])]) then 0 else 1"><xsl:variable name="pVariable"><xsl:copy-of select="."/></xsl:variable><xsl:choose><xsl:when test="current-grouping-key()=1"><note><bodytext><p><xsl:apply-templates select="$pVariable/p/@*"/><xsl:apply-templates select="current-group()"/></p></bodytext></note></xsl:when><xsl:otherwise><xsl:apply-templates select="current-group()"/></xsl:otherwise></xsl:choose></xsl:for-each-group></xsl:template>
Template
figure/p/text
Namespace
No namespace
Match
figure/p/text
Mode
#default
Import precedence
0
Priority
20
Source
<xsl:template match="figure/p/text" priority="20"><xsl:choose><xsl:when test="parent::p[child::*[not(self::heading or self::inlineobject or self::link or self::text[not(child::*[not(self::heading or self::inlineobject or self::link)])])]]"><text><xsl:apply-templates select="@* | node()"/></text></xsl:when><xsl:otherwise><xsl:apply-templates/></xsl:otherwise></xsl:choose></xsl:template>
Template
figure[child::p[child::text[child::inlineobject]]][$streamID='CA01' or $streamID='CA15']
Documentation
Description
Vikas Rohilla : Updated for the streamID CA01
Namespace
No namespace
Match
figure[child::p[child::text[child::inlineobject]]][$streamID='CA01' or $streamID='CA15']
<xsl:template match="figure[child::p[child::text[child::inlineobject]]][$streamID='CA01' or $streamID='CA15']"><xsl:apply-templates select="descendant::inlineobject"/></xsl:template>
Template
glp:note[$streamID='UK08OR']
Documentation
Description
JD: 2017-11-27: updated for Web* 7054824.
Limiting to certain streams for now, but may be more broadly applicable. UK08 only mentions glp:note/h in this file (id-CCCC-10320), but glp:note has no handling. Inferring from CI example.
The source document has footnote references, footnotegrps and footnotes. In the
NL schema, footnote references, footnotegroup and footnotes are tagged at the
same location where they appear in the source document.
The footnote markup for NL schema as described below:
The footnotegrp/footnote becomes
footnotegroup/footnote
The footnotegrp/heading becomes
footnotegroup/heading.
If footnotegrp is the child of
bodytext, then it becomes
bodytext/p/text/footnotegroup.
If footnotegrp is the child of
leg:bodytext, then it becomes
primlaw:bodytext/p/text/footnotegroup.
If footnotegrp is a child of
level/bodytext,
level/bodytext mapped with
seclaw:level/seclaw:bodytext and
primlaw:level/primlaw:bodytext in
different content model. Then follow below listed instructions:
Commentary, Form, Precedents and Textbooks:seclaw:level/seclaw:bodytext/p/text/footnotegroup
and
form:form/form:document/form:bodytext/form:p/form:text/footnotegroup.
If footnotegrp is a child of
case:judgments, then it becomes
courtcase:opinions/footnotegroup.
If footnotegrp is a child of
case:judgmentbody, then it becomes
courtcase:opinion/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
case:headnote, then it becomes
courtcase:head/footnotegroup.
If footnotegrp is a child of
case:decisionsummary, then it becomes
casesum:decisionsummary/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
case:factsummary, then it becomes
casesum:editorialsummary/p/text/footnotegroup.
If footnotegrp is a child of
case:references, then it becomes
ref:relatedrefs/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
case:typeofcase, then it becomes
casesum:overview/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
p, then it becomes
p/text/footnotegroup.
If footnotegrp is a child of
glp:note, then it becomes
note/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
blockquote, then it becomes
blockquote/p/text/footnotegroup.
If footnotegrp is a child of
li, then it becomes
listitem/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
pgrp, then it becomes
pgrp/p/text/footnotegroup.
If footnotegrp is a child of
case:appendix, then it becomes
appendix/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
case:consideredcases, then it becomes
ref:relatedrefs/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
case:priorhist, then it becomes
casehist:summary/p/text/footnotegroup.
If footnotegrp is a child of
note, then it becomes
note/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
prelim, then it becomes
courtcase:prelim/bodytext/p/text/footnotegroup.
If footnotegrp is a child of
catchwordgrp, then it becomes
classify:classification
classify:classitem/classify:classitem-identifier/classify:classname/footnotegroup.
If footnotegrp is a child of
sigblock, then it becomes
sigblock/p/text/footnotegroup.
If footnotegrp is a child of
frm:body, then it becomes
form:document/form:bodytext/form:p/form:text/footnotegroup.
If footnotegrp is a child of
clause, then it becomes
form:clause/form:bodytext/form:p/form:text/footnotegroup.
If footnotegrp is a child of
frm:div, then it becomes
form:div/form:bodytext/form:p/form:text/footnotegroup.
Create footnote/ref:anchor with
@id and set
footnote/ref:anchor[@id] to the value of
footnote[@fntoken].
Note: ref:anchor[@id] that begins with a
number must have an underscore added at start.
Note:
This note is applicable only to UK footnotes with a value of
"0" in footnote/@fntoken (all
content types within UK): For every
footnote[@fntoken="0"], a unique
value should be placed in the target
ref:anchor/@id. Numeric values in
ref:anchor/@id must be prepended with
"_". Any unique values are acceptable inside
ref:anchor/@id, but the simplest
solution is to start with <ref:anchor
id="_1"/> for the first footnote encountered
and increment the value by 1 for each subsequent footnote (e.g.
<ref:anchor id="_1"/>,
<ref:anchor id="_2"/>,
<ref:anchor id="_3"/>,
etc.)
If the value of
ref:anchor/@id is not "0", then it
should be carried through to
ref:anchor/@id as is.
Drop attribute @fnrtokens and
@fntoken from the
footnote element, but note as described above
that the source footnote[@fntoken] value is moved
to the target footnote/ref:anchor[@id]
Create ref:returnreference/reflocator.
@anchoridref is set to the id value of
the first reference to this footnote. For example,
footnote/ref:anchor[@id="_1"], will
use the value
from((//footnote-ref[@anchoridref="_1"])[1])/ref:anchor/@id.
Note: If
the return reference ID cannot be located, it is not
necessary to create the
ref:returnreference.
@anchortype is set to "local"
footnote/fnlabel becomes
footnote/label.
footnote/fnbody becomes
footnote/bodytext.
Special Canada rule to suppress indent:footnote/fnbody/p[@indent] becomes
footnote/bodytext/p. That is,
suppress @indent for all Canada streams.
(Note that attribute p[@i] is also
suppressed, as per General Markup rules for
p).
footnote/@type becomes
footnote/@role unless the value of
footnote/@type is "default" or "annotation",
in which case footnote/@type is suppressed and
footnote/@role is not generated.
If footnote/fnbody contains
p/refpt and the value of
refpt/@id is the same as the value of
footnote/@fntoken, then the
refpt should be suppressed because a
ref:anchor with the same value in
@id is created as child of the target
footnote
If footnote appears without
fnr the footnote contents should still be
output as footnote.
The fnr markup for NL schema as described below:
fnr becomes
footnote-ref.
@fntoken becomes
@anchoridref.
@fnrtoken becomes
footnote-ref/ref:anchor[@id] the value must
be unique.
The fnr content becomes
label
fnr/@id becomes
footnote-ref/@xml:id.
Note: All
xml:id attributes that begin with a
number must have an underscore added at start.
Note: @anchoridref that begins with a number must
have an underscore added at start. Also apply other identifier data
type format as used for xml:id and
ref:anchor/@id (e.g. change colon to
underscore).
fnr/@alt-label should be suppressed from
conversion because this attribute is already deprecated in the DTD
itself.
If input documents is having scenario
leg:bodytext/fnr then it becomes
primlaw:bodytext/textitem/footnote-ref.
Use the matching criteria below to ensure hyperlinks are working:
Use the @fnrtoken attribute to match the
source footnote reference indicated by fnr
with the actual source footnote content contained in the
footnote.
If appears without footnote then conversion
need to put the reference (fnr) in an xml comment along with
this note: footnote reference without footnote is a data
error..
If fnr is empty, then it should be
suppressed.
Exceptional scenario for UK22CS: Supress
@type="editorial" attribute from
footnote element in target.
Note: This
instruction should be revisited and possibly changed if “editorial”
is actually used more appropriately in the future.
lilabel/fnr becomes
label/footnote-ref
If footnotegrp is a child of
legfragment, then it becomes
primlaw:excerpt/primlaw:bodytext/p/text/footnotegroup.
Source xml: more than one footnote reference points at the same
footnote
<p> <table frame="all" pgwide="1"> <tgroup cols="1"
colsep="0" rowsep="0" align="left"> <colspec colwidth="50*" colname="col1"
colsep="0" rowsep="0"/> <tbody valign="top"> <row rowsep="0">
<entry morerows="0" colsep="0" rowsep="0">Except for land and copyright,
<fnr fntoken="PBEP.C5.FN51" fnrtoken="PBEP.C5.FN51-R">51</fnr>
equitable interests can be created verbally. In undertaking an estate review,
care must be taken to establish the scope of equitable rights that may be
embedded in a person’s property at the time of review. The
practitioner must ensure that the existence and administration of those rights
are dealt with in accordance with the instruction of or legal obligations of the
client.</entry> </row> </tbody> </tgroup> </table>
<text> <fnr fntoken="PBEP.C5.FN51"
fnrtoken="PBEP.C5.FN51-R">51</fnr> </text> </p>
<footnotegrp> <!-- Etc. --> <footnote fntoken="PBEP.C5.FN51"
fnrtokens="PBEP.C5.FN51-R" type="default" > <fnlabel>51</fnlabel>
<fnbody> <p> <refpt type="ext"
id="PBEP.C5.FN51"/><text>See Copyright Act 1968 (Cth) <ci:cite
searchtype="LEG-REF"> <ci:content> <remotelink
refpt="IPCPY.CPA.CPA.S8" dpsi="0JVS" docidref="EFGH_9876" remotekey1="REFPTID"
service="DOC-ID">ss 8</remotelink> </ci:content></ci:cite>
and <ci:cite searchtype="LEG-REF"> <ci:content> <remotelink
refpt="IPCPY.CPA.CPA.S196" dpsi="0JVS" docidref="EFGH_9876" remotekey1="REFPTID"
service="DOC-ID" >196</remotelink> </ci:content>
</ci:cite>. </text> </p> </fnbody> </footnote>
</footnotegrp>
Target xml: more than one footnote reference points at the same
footnote
<p> <table frame="all" pgwide="1"> <tgroup cols="1"
align="left"> <colspec colname="col1" colwidth="50*"/>
<tbody valign="top"> <row> <entry>Except for land and
copyright, <footnote-ref anchoridref="PBEP.C5.FN51"> <ref:anchor
id="PBEP.C5.FN51-R"/> <label>51</label> </footnote-ref>
equitable interests can be created verbally. In undertaking an estate review,
care must be taken to establish the scope of equitable rights that may be
embedded in a person’s property at the time of review. The
practitioner must ensure that the existence and administration of those rights
are dealt with in accordance with the instruction of or legal obligations of the
client. </entry> </row> </tbody> </tgroup>
</table> <text> <footnote-ref anchoridref="PBEP.C5.FN51">
<ref:anchor id="PBEP.C5.FN51-R_1"/> <label>51</label>
</footnote-ref> </text> </p> <footnotegroup>
<footnote> <ref:anchor id="PBEP.C5.FN51"/>
<ref:returnreference> <ref:locator anchoridref="PBEP.C5.FN51-R"
anchortype="local"/> </ref:returnreference>
<label>51</label> <bodytext> <p> <text>See
Copyright Act 1968 (Cth) <lnci:cite
type="legislation"> <lnci:content> <ref:crossreference
crossreferencetype="seeAlso"> <ref:content>ss 8</ref:content>
<ref:locator anchoridref="IPCPY.CPA.CPA.S8"> <ref:locator-key>
<ref:key-name name="DOC-ID"/> <ref:key-value
value="0JVS-EFGH_9876"/> </ref:locator-key> </ref:locator>
</ref:crossreference> </lnci:content> </lnci:cite> and
<lnci:cite type="legislation"> <lnci:content> <ref:crossreference
crossreferencetype="seeAlso"> <ref:content>196</ref:content>
<ref:locator anchoridref="IPCPY.CPA.CPA.S196"> <ref:locator-key>
<ref:key-name name="DOC-ID"/> <ref:key-value
value="0JVS-EFGH_9876"/> </ref:locator-key> </ref:locator>
</ref:crossreference> </lnci:content> </lnci:cite>.
</text> </p> </bodytext> </footnote>
</footnotegroup>
Source xml: fnr appear without
footnote
<case:factsummary> <p> <text> <fnr
fntoken="1ald095fn2" fnrtoken="1ald095fn2-r">1</fnr> Crystal wine
glasses sent on behalf of the applicant by post from Sydney to Melbourne were
broken in transit. The glasses were packed in individual compartments in a box
made of fairly flimsy cardboard and were individually wrapped in tissue paper.
There was no external packaging to cushion the box and its contents against
damage by impact. The box was marked Fragile. The applicant claimed compensation
from the Australian Postal Commission for the breakage of the glasses. His claim
was refused on the basis that Postal by-law 292 precluded compensation where the
goods damaged were not adequately wrapped to protect them in the ordinary course
of transmission. The applicant appealed to the Tribunal asserting that the
marking Fragile on the goods should have indicated to the Commission that the
goods had to be handled with care. </text> </p> …
</case:factsummary>
Target xml: fnr appear without
footnote
<casesum:summaries> <casesum:editorialsummar> <p>
<text> <!-- a footnote reference without footnote is a data error.
<fnr fntoken="1ald095fn2" fnrtoken="1ald095fn2-r">1</fnr> -->
Crystal wine glasses sent on behalf of the applicant by post from Sydney to
Melbourne were broken in transit. The glasses were packed in individual
compartments in a box made of fairly flimsy cardboard and were individually
wrapped in tissue paper. There was no external packaging to cushion the box and
its contents against damage by impact. The box was marked Fragile. The applicant
claimed compensation from the Australian Postal Commission for the breakage of
the glasses. His claim was refused on the basis that Postal by-law 292 precluded
compensation where the goods damaged were not adequately wrapped to protect them
in the ordinary course of transmission. The applicant appealed to the Tribunal
asserting that the marking Fragile on the goods should have indicated to the
Commission that the goods had to be handled with care. </text> </p>
… </casesum:editorialsummar> </casesum:summaries>
<primlaw:bodytext> <textitem> <footnote-ref
anchoridref="CPQ.QCAT.QCATPD"> <ref:anchor id="CPQ.QCAT.QCATPD-R"/>
<label>*</label> </footnote-ref> </textitem>
</primlaw:bodytext> <footnotegroup> <footnote> <ref:anchor
id="CPQ.QCAT.QCATPD"/> <ref:returnreference> <ref:locator
anchoridref="CPQ.QCAT.QCATPD-R" anchortype="local"/>
</ref:returnreference> <label>*</label> <bodytext>
<p> <text> © The State of Queensland (Queensland Civil
and Administrative Tribunal) 2010. QCAT applications fees reproduced with the
kind permission of the Queensland Civil and Administrative Tribunal. See <url
normval="http://www.qcat.qld.gov.au"> www.qcat.qld.gov.au</url>
</text> </p> </bodytext> </footnote>
</footnotegroup>
Source xml: footnote/fnbody/p/refpt/@id holds the same
value as footnote/@fntoken
<p> <text>The purchaser's solicitor should be careful where
a right to rescind arises in the purchaser's favour. In conveyancing matters,
the solicitor's knowledge of the right to rescind or the facts giving rise to
that right is imputed to the client. The solicitor's conduct may, if care is not
taken, amount to an affirmation of the contract as still on foot or a
termination of it, notwithstanding the client's ignorance. <fnr
fnrtoken="CONN.DAR.11102.ANT2-R" fntoken="CONN.DAR.11102.ANT2">2</fnr>
</text> </p> <!-- Etc. --> <footnote
fnrtokens="CONN.DAR.11102.ANT2-R" fntoken="CONN.DAR.11102.ANT2"
type="default"> <fnlabel>2</fnlabel> <fnbody> <p>
<refpt id="CONN.DAR.11102.ANT2" type="ext"/> <text> <ci:cite
searchtype="CASE-REF">...</ci:cite> </text> </p>
</fnbody> </footnote>
Target xml: footnote/fnbody/p/refpt has been
suppressed
<p> <text>The purchaser's solicitor should be careful where
a right to rescind arises in the purchaser's favour. In conveyancing matters,
the solicitor's knowledge of the right to rescind or the facts giving rise to
that right is imputed to the client. The solicitor's conduct may, if care is not
taken, amount to an affirmation of the contract as still on foot or a
termination of it, notwithstanding the client's ignorance. <footnote-ref
anchoridref="CONN.DAR.11102.ANT2"> <ref:anchor
id="CONN.DAR.11102.ANT2-R"/> <label>2</label>
</footnote-ref> </text> </p> <footnote> <ref:anchor
id="CONN.DAR.11102.ANT2"/> <ref:returnreference> <ref:locator
anchoridref="CONN.DAR.11102.ANT2-R" anchortype="local"/>
</ref:returnreference> <label>2</label> <bodytext>
<p> <text> <lnci:cite>...</lnci:cite> </text>
</p> </bodytext> </footnote>
Source xml: leg:bodytext/footnotegrp scenario
<leg:bodytext> <p> <text> (a) An oil discharge
monitoring and control system approved by the Administration shall be fitted. In
considering the design of the oil content meter to be incorporated in the
system, the Administration shall have regard to the specification recommended by
the Organization. <fnr fntoken="WA_ACT_1987-14_FN"
fnrtoken="WA_ACT_1987-14_FN-R">*</fnr> .... </text> </p>
<footnotegrp> <footnote fntoken="WA_ACT_1987-14_FN"
fnrtokens="WA_ACT_1987-14_FN-R" type="default">
<fnlabel>*</fnlabel> <fnbody> <p> <text
align="left"> Reference is made to the Recommendation on International
Performance Specifications for Oily-Water Separating Equipment and Oil Content
Meters adopted by the Organization by Resolution A.233(VII). </text>
</p> </fnbody> </footnote> </footnotegrp>
</leg:bodytext>
<primlaw:bodytext> <p> <text>(a) An oil discharge
monitoring and control system approved by the Administration shall be fitted. In
considering the design of the oil content meter to be incorporated in the
system, the Administration shall have regard to the specification recommended by
the Organization. <footnote-ref anchoridref="WA_ACT_1987-14_FN">
<ref:anchor id="WA_ACT_1987-14_FN-R"/> <label>*</label>
</footnote-ref> .... </text> </p> <p> <text>
<footnotegroup> <footnote> <ref:anchor
id="WA_ACT_1987-14_FN"/> <ref:returnreference> <ref:locator
anchoridref="WA_ACT_1987-14_FN-R" anchortype="local"/>
</ref:returnreference> <label>*</label> <bodytext>
<p> <text> <p align="left"> <text>Reference is made to
the Recommendation on International Performance Specifications for Oily-Water
Separating Equipment and Oil Content Meters adopted by the Organization by
Resolution A.233(VII). </text> </p> </text> </p>
</bodytext> </footnote> </footnotegroup> </text>
</p> </primlaw:bodytext>
Source xml: bodytext/footnotegrp scenario
<bodytext> ... <entry colname="c1">Fair Work (State Referral
and Consequential and Other Amendments) Act 2009 No 54 <fnr
fntoken="WRA.OL.ICAC06.FNT1" fnrtoken="WRA.OL.ICAC06.FNT1-R">*</fnr>
</entry> <entry colname="c2">25 June 2009</entry> <entry
colname="c3">Sch 14[1]–[11]: 1 July 2009</entry> ...
<footnotegrp> <footnote fntoken="WRA.OL.ICAC06.FNT1"
fnrtokens="WRA.OL.ICAC06.FNT1-R" type="default">
<fnlabel>*</fnlabel> <fnbody> <h>Editor's
note:</h> <p><refpt type="ext" id="WRA.OL.ICAC06.FNT1"/>
<text><emph typestyle="bf">Please be aware that item 11, Schedule 14
of this Act provides the following:</emph> </text> </p>
</fnbody> </footnote> </footnotegrp> </bodytext>
<xsl:template match="footnotegrp"><!-- default behavior --><xsl:variable name="form-level-types" select="('prec.grp' , 'precgrp' , 'precgrp1' , 'precgrp2' , 'prec' , 'form')"/><xsl:choose><!-- in these scenarios, parent elements should have already been transformed to the appropriate
bodytext (or other appropriate) parent wrapper, and will need a p/text parent. At least in the
generic modules, which I, JL, checked. case:appendix doesn't have the instruction but the examples
show it, and case:consideredcases may be dicey, depending on how its template is developed.
-JL
--><!-- this clause parent works for UK14 CIs, not sure about anything else - JL --><xsl:when test="parent::frm:div or parent::frm:body or parent::clause or ($streamID=('AU05' , 'NZ09') and (parent::bodytext[parent::level[@leveltype=$form-level-types]] or parent::bodytext[parent::level[@leveltype='comm.chap'][level[@leveltype=$form-level-types]][not(level[@leveltype='para0'])]] or parent::blockquote[parent::bodytext[parent::level[@leveltype=$form-level-types]]] or parent::blockquote[parent::bodytext[parent::level[@leveltype='comm.chap'][level[@leveltype=$form-level-types]][not(level[@leveltype='para0'])]]]) or parent::bodytext[parent::form] or parent::blockquote[parent::bodytext[parent::form]] )"><form:p><form:text><footnotegroup><xsl:apply-templates select="@* | node()"/></footnotegroup></form:text></form:p></xsl:when><xsl:when test="$streamID='HK07' and parent::bodytext[parent::level[@leveltype='prec' or @leveltype='prec.grp' or @leveltype='precgrp' or @leveltype='precgrp1' or @leveltype='precgrp2' or parent::comm.chap or ancestor::level[@leveltype = 'prec.grp']]]"><form:p><form:text><footnotegroup><xsl:apply-templates select="@* | node()"/></footnotegroup></form:text></form:p></xsl:when><xsl:when test="parent::bodytext or parent::leg:bodytext or parent::case:judgmentbody or parent::case:decisionsummary or parent::case:factsummary or parent::case:references or parent::case:typeofcase or parent::glp:note or parent::blockquote or parent::li or parent::pgrp or parent::case:appendix or parent::case:consideredcases or parent::case:priorhist or parent::note or parent::prelim or parent::jrnl:prelim or parent::sigblock"><p><text><footnotegroup><xsl:apply-templates select="/JOURNALDOC/jrnl:body/jrnl:prelim/footnotegrp/footnote[$streamID='CA15']"/><xsl:apply-templates select="@* | node()"/></footnotegroup></text></p></xsl:when><xsl:when test="parent::p"><text><footnotegroup><xsl:apply-templates select="@* | node()"/></footnotegroup></text></xsl:when><xsl:otherwise><!-- accounting for these parents even tho the instruction is redundant so I can keep track
case:judgements becomes courtcase:opinions
case:headnote becomes courtcase:head
no intervening p/text needed
catchwordgrp parent - one of the catchwordgrp modules indicates where the footnotegroup should be output
so I'll assume the placement of footnotegrp is handled there (which is the proper place),
but it takes this option.
- JL
--><footnotegroup><xsl:apply-templates select="@* | node()"/></footnotegroup></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="footnote"><footnote><xsl:apply-templates select="@type"/><xsl:variable name="fnDupStatus"><xsl:call-template name="amIaDuplicate"/></xsl:variable><xsl:variable name="normalizedfnfntoken"><!-- normalize the footnote's fntoken --><xsl:for-each select="@fntoken"><xsl:call-template name="normalizeIdString"/></xsl:for-each></xsl:variable><xsl:variable name="normalizedmatchingfnrtoken"><!-- normalize the fnrtoken of the first matching fnr --><!-- if there is no match this variable will return empty and that is fine --><xsl:if test="key('fnr-footnote-tokens', @fntoken)"><!-- if there is any matching fnr, for the first one... --><xsl:for-each select="key('fnr-footnote-tokens', @fntoken)[1]"><xsl:for-each select="@fnrtoken"><xsl:call-template name="normalizeIdString"/></xsl:for-each></xsl:for-each></xsl:if></xsl:variable><xsl:variable name="isSpecialMatchingConditionMet" select="if ($normalizedfnfntoken = $normalizedmatchingfnrtoken and count(key('idTypeValue', @fntoken)) < 3 and not(key('idTypeValue' , concat($normalizedmatchingfnrtoken , '_R'))) ) then 0 else 1"/><!-- we're only going to increment if we have 2 of the same input tokens or less (1 each fntoken, fnrtoken). Otherwise, too messy --><!-- we're not going to increment if the incremented value is already an ID. No point in it. --><!-- 0 means we have a match, 1 means we failed to match anything --><xsl:choose><xsl:when test="$fnDupStatus = 'false' or $isSpecialMatchingConditionMet=0"><ref:anchor><xsl:apply-templates select="@fntoken"/><xsl:if test="$streamID = 'AU15'"><xsl:attribute name="anchortype">global</xsl:attribute></xsl:if></ref:anchor></xsl:when><xsl:when test="starts-with($streamID, 'UK') and @fntoken='0'"><!-- generate unique id here, how? --><xsl:variable name="newID"><xsl:value-of select="concat('_' , count(preceding::footnote)+1)"/></xsl:variable><xsl:choose><xsl:when test="key('idTypeValue', $newID)"><xsl:attribute name="id" select="concat($newID, '_footnote_footnote')"/></xsl:when><xsl:otherwise><xsl:attribute name="id" select="$newID"/></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><ref:anchor><!-- Awantika: creating @id as it required with the dummy value --><xsl:attribute name="id"><xsl:text>XXXX_</xsl:text><xsl:value-of select="generate-id()"/></xsl:attribute><xsl:comment>Data Error: footnote token was a duplicate or missing id and has been removed. ref:anchor output with autogenerated @id.</xsl:comment></ref:anchor><!-- use default rules to throw an error message here, need error code --><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select=" 'Data Error: footnote token was a duplicate or missing id and has been removed. ref:anchor output with autogenerated @id. ' "/><xsl:with-param name="errorType" as="xs:string" select=" 'ICCE' "/><xsl:with-param name="errorCode" as="xs:string*" select=" 'TBD' "/><xsl:with-param name="context" as="xs:string"><xsl:value-of select="base-uri()"/></xsl:with-param></xsl:call-template></xsl:otherwise></xsl:choose><xsl:if test="key('fnr-footnote-tokens', @fntoken) or ($isSpecialMatchingConditionMet=0)"><xsl:for-each select="key('fnr-footnote-tokens', @fntoken)[1]"><ref:returnreference><ref:locator><xsl:attribute name="anchoridref"><xsl:choose><xsl:when test="$isSpecialMatchingConditionMet=0"><xsl:value-of select="concat($normalizedmatchingfnrtoken , '_R')"/></xsl:when><xsl:otherwise><xsl:for-each select="@fnrtoken"><xsl:call-template name="normalizeIdString"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:attribute><xsl:attribute name="anchortype">local</xsl:attribute></ref:locator></ref:returnreference></xsl:for-each></xsl:if><xsl:apply-templates/></footnote></xsl:template>
<xsl:template match="footnote/fnbody"><!-- Original Target XPath: footnote/bodytext --><bodytext><xsl:apply-templates select="@* | node()"/></bodytext></xsl:template>
Template
footnote/@type
Documentation
Description
JD: SharedServices schemas only allow @role of 'footnote' or 'endnote'; removing $streamID as @role='editorial' is not allowed in ANY stream.
Namespace
No namespace
Match
footnote/@type
Mode
#default
Import precedence
0
Source
<xsl:template match="footnote/@type"><xsl:choose><xsl:when test=". = 'editorial'"/><!-- and $streamID='UK08CA' --><!--<xsl:when test=". = 'editorial' and $streamID='UK09' "/>--><!-- AS:For UK09 if role ="editorial" comes then validation error is coming as contravenes to footnote ,endnot role --><xsl:when test=".!='default' and .!='annotation'"><xsl:attribute name="role"><xsl:value-of select="."/></xsl:attribute></xsl:when></xsl:choose></xsl:template>
<xsl:template match="footnote/@fntoken"><!--for use in ref:anchor
This shouldn't be applied unless we've already removed duplicates --><xsl:attribute name="id"><xsl:call-template name="normalizeIdString"/></xsl:attribute></xsl:template>
<xsl:template match="fnr"><xsl:if test="node() | @*"><xsl:choose><!-- see if there is a footnote which has a @fntoken matching this fnr/@fntoken
could try 2nd attmept with @fnrtoken / @fnrtokens but that requires new key
--><!-- JD: 2017-06-14: adding additional keys; data clearly has matching tokens that aren't picked up by existing keys --><xsl:when test=" key('idTypeValue', @fntoken)[self::footnote]"><!--xsl:when test="key('idTypeValue', @fntoken)[self::footnote]"--><xsl:choose><xsl:when test="parent::leg:bodytext"><textitem><xsl:call-template name="outputFootnoteRef"/></textitem></xsl:when><xsl:otherwise><xsl:call-template name="outputFootnoteRef"/></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><!-- CSN - 2017/10/25 - Webstar 7026508 - Stream UK06 should not show error message, just comment out fnr if no footnote --><!-- JL 20180104 - Many webstars including email with Andrew Martin and Sivapragasam M. to "turn off" this footnote
error message for all AU and NZ streams. It was already "off" for AU11, AU14, NZ06, NZ08, and NZ18, so those streams won't
need to be re-released --><xsl:if test="not($streamID = ('UK01','UK02','UK03','UK06','UK07','UK08OR','UK08CA','UK20') or starts-with($streamID , 'AU') or starts-with($streamID , 'NZ'))"><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select=" 'footnote reference without a footnote is a data error.' "/><xsl:with-param name="errorType" as="xs:string" select=" 'ICCE' "/><xsl:with-param name="errorCode" as="xs:string*" select=" 'TBD' "/><xsl:with-param name="context" as="xs:string"><xsl:value-of select="base-uri()"/></xsl:with-param></xsl:call-template></xsl:if><xsl:comment><xsl:text>footnote reference without a footnote is a data error. </xsl:text><xsl:copy-of select="."/></xsl:comment></xsl:otherwise></xsl:choose></xsl:if></xsl:template>
<xsl:template name="outputFootnoteRef"><!--saves typing multiple times--><footnote-ref><xsl:apply-templates select="@id"/><xsl:apply-templates select="@fntoken"/><xsl:variable name="fnrDupStatus"><xsl:call-template name="amIaDuplicate"/></xsl:variable><xsl:variable name="normalizedfnrfnrtoken"><!-- normalize the footnote's fntoken --><xsl:for-each select="@fnrtoken"><xsl:call-template name="normalizeIdString"/></xsl:for-each></xsl:variable><xsl:variable name="normalizedmatchingfnsfntoken"><!-- normalize the value of fnrtokens for each matching footnote
If there are multiples, it won't work, I'll consider it's just not a match and we move on.
--><!-- if there is no match or this variable will return empty and that is fine --><xsl:for-each select="key('idTypeValue' , @fntoken)[self::footnote]"><xsl:for-each select="(@fntoken)"><xsl:call-template name="normalizeIdString"/></xsl:for-each></xsl:for-each></xsl:variable><xsl:variable name="isSpecialfnrMatchingConditionMet" select="if ($normalizedfnrfnrtoken = $normalizedmatchingfnsfntoken and count(key('idTypeValue', @fnrtoken)) < 3 and not(key('idTypeValue' , concat($normalizedfnrfnrtoken , '_R'))) ) then 0 else 1"/><!-- we're only going to increment if we have 2 of the same input tokens or less (1 each fntoken, fnrtoken). Otherwise, too messy --><!-- we're not going to increment if the incremented value is already an ID. No point in it. --><!-- 0 means we have a match, 1 means we failed to match anything --><xsl:choose><xsl:when test="$fnrDupStatus = 'false' or $isSpecialfnrMatchingConditionMet=0"><xsl:apply-templates select="@fnrtoken"><xsl:with-param name="specialMatch" select="$isSpecialfnrMatchingConditionMet"/><xsl:with-param name="incrementedfnrtokenValue" select="concat($normalizedfnrfnrtoken , '_R')"/></xsl:apply-templates></xsl:when><xsl:otherwise><ref:anchor><!-- Awantika: creating @id as it required with the dummy value --><xsl:attribute name="id"><xsl:text>XXXX_</xsl:text><xsl:value-of select="generate-id()"/></xsl:attribute><!-- may also need error message output --><!-- wpk 2017-12-11. Removed comment. You can read background in webstar 7055608.
in short: multiple references to single footnote creates ID problem in that what does user get set "back to" when linking back to reference.
App has no way to "link back" to the second (or subsequent) references to a given footnote. So default behavior is to link back to
the first one. This limitation confirmed with presentation team.
<xsl:comment>footnote reference token was a duplicate or missing id and has been removed. ref:anchor output with generated @id.</xsl:comment>
--><!--<xsl:value-of select="name()"/>--></ref:anchor><!-- JL 20171108: this is a data error that rarely causes a problem with footnote linking. Comma should be sufficient.
LBUs do not want webstars for this, as most of these footnote do not have 2-way linking per CI.
webstar 7043982
<xsl:call-template name="outputErrorMessage">
<xsl:with-param name="messageText" as="xs:string" select=" 'footnote reference token was a duplicate or missing id and has been removed.
ref:anchor output with no @id. ' "/>
<xsl:with-param name="errorType" as="xs:string" select=" 'ICCE' "/>
<xsl:with-param name="errorCode" as="xs:string*" select=" 'TBD' "/>
<xsl:with-param name="context" as="xs:string"><xsl:value-of select="base-uri()"/></xsl:with-param>
</xsl:call-template> --></xsl:otherwise></xsl:choose><label><xsl:apply-templates select="node()"/></label></footnote-ref></xsl:template>
form-chars becomes proc:formchars
and includes the attributes @formchar and
@formcharuse. Attributes
@formchar and @formcharuse are
required attributes in proc:formchars and the values for
these attributes are tokenized in the NewLexis Schema.
Attribute @formchar allows the tokenized values listed
below:
proc:formchars[@formchar="dot"]
proc:formchars[@formchar="rule"]
proc:formchars[@formchar="dbl-rule"]
proc:formchars[@formchar="hypen"]
proc:formchars[@formchar="invisible"]
Below are the values for proc:formchars[@formchar] found
in the source documents and the corresponding mapping in NewLexis.
proc:formchars[@formcharuse="leaderfill"]@formcharuse="leaderfill" means fill the available
space with the formchar. Basically, push the text on each side out to the
margins if possible.
proc:formchars[@formcharuse="other"]
The following are the widths (in points) used for this element in print for each
possible value of @formcharuse. To determine the number
of characters, divide the point value by 6.
proc:formchars[@formcharuse="date"] 66 ->11
proc:formchars[@formcharuse="day"] 36 ->6
proc:formchars[@formcharuse="month"] 48 -> 8
proc:formchars[@formcharuse="year"] 36 -> 6
proc:formchars[@formcharuse="num"] 36 -> 6
proc:formchars[@formcharuse="money"] 42 -> 7
proc:formchars[@formcharuse="address"] 72 -> 12
proc:formchars[@formcharuse="name"] 66 -> 11
proc:formchars[@formcharuse="longname"] 132 ->
22
proc:formchars[@formcharuse="other"] 66 -> 11
Below are the values for proc:formchars[@formcharuse]
found in the source documents and the corresponding mapping in NewLexis.
Note: If the value for @num-char doesn't fall in the above
specified list then use higher @formcharuse value in
target mapping. For example: If value for
form-chars/@num-char is "7" then use
"month" as the value for
proc:formchars/@formcharuse.
Note: If @num-char value goes beyond 22 simply use
@formcharuse="longname" except below use case:
<form-chars character="dotleader" num-char="55.4" />
will become <proc:formchars formchar="invisible" fromcharuse="leaderfill"
/>
<p>If <sourcexml>footnote/fnbody</sourcexml> contains
<sourcexml>p/refpt</sourcexml> and the value of
<sourcexml>refpt/@id</sourcexml> is the same as the value of
<sourcexml>footnote/@fntoken</sourcexml>, then the
<sourcexml>refpt</sourcexml> should be suppressed because a
<targetxml>ref:anchor</targetxml> with the same value in
<targetxml>@id</targetxml> is created as child of the target
<targetxml>footnote</targetxml></p>
<glp:note notetype="warning">
<p><text>Editor's Note: This document contains the full text of sections 1 to 70 and the Schedule. The Appendices to the Act are found in a separate document. Please conduct a cite search for "S.B.C. 1999, c. 2" to obtain all relevant documents.Acts Affected: Adoption Act, R.S.B.C. 1996, c. 5; Child, Family and Community Service Act, R.S.B.C. 1996, c. 46; Environmental Assessment Act, R.S.B.C. 1996, c. 119; Estate Administration Act, R.S.B.C. 1996, c. 122;...</text></p>
</glp:note>
Target XML
<note notetype="warning">
<bodytext>
<p><text>Editor's Note: This document contains the full text of sections 1 to 70 and the Schedule. The Appendices to the Act are found in a separate document. Please conduct a cite search for "S.B.C. 1999, c. 2" to obtain all relevant documents.Acts Affected: Adoption Act, R.S.B.C. 1996, c. 5; Child, Family and Community Service Act, R.S.B.C. 1996, c. 46; Environmental Assessment Act, R.S.B.C. 1996, c. 119; Estate Administration Act, R.S.B.C. 1996, c. 122;...</text></p>
</bodytext>
</note>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_glp.note-LxAdv-note.dita
JD: 2017-08-08: Note that this also processes 'leg:histnote' via template name, called from this module; this was done to match DT output, which groups both under a <notes> wrapper
<xsl:template match="glp:note" name="glp-note-generic"><note><xsl:if test="self::leg:histnote"><xsl:attribute name="notetype" select="'historical'"/></xsl:if><xsl:if test="$streamID='AU18' and child::heading/desig/designum/refpt"><xsl:attribute name="notetype" select="'jurisdiction-variant'"/></xsl:if><xsl:choose><xsl:when test="$streamID='AU18' and ./@id = descendant::refpt/@id"/><xsl:otherwise><xsl:apply-templates select="@id"/></xsl:otherwise></xsl:choose><xsl:apply-templates select="@* except @id"/><!-- from
DITA/ConversionInstructions/Rosetta/common_newest/Rosetta_leg.comntry-level_LEVELTYPE_GROUP-LxAdv-annot.annotations-annot.annotation-grp.dita
and other annotation CIs--><xsl:if test="not(@notetype) and ancestor::level[ancestor::leg:comntry] and not(descendant::inlineobject | following-sibling::inlineobject)"><xsl:attribute name="notetype" select="'xref'"/></xsl:if><xsl:apply-templates select="refpt | heading/descendant::refpt"/><xsl:apply-templates select="heading"/><!-- SS: template added for handling heading and h under caseinfo for NZ03 cases--><xsl:if test="preceding-sibling::heading[parent::caseinfo][$streamID='NZ03']"><xsl:apply-templates select="preceding-sibling::heading[parent::caseinfo]"/><xsl:apply-templates select="preceding-sibling::h[parent::caseinfo]"/></xsl:if><xsl:if test="child::*[not(self::heading)][not(self::refpt)]"><bodytext><!-- Awantika: if remotelink is the child of glp:note then p/text is required --><xsl:choose><xsl:when test="child::remotelink or not(child::p/child::table or child::p/child::text) and $streamID=('HK03, NZ03')"><p><text><xsl:apply-templates select="child::* except (heading | refpt)"/></text></p></xsl:when><!--Satbir: Added condition for handling "glp:note/p/table"--><xsl:when test="child::p/child::table or child::p/child::text and $streamID='NZ03'"><xsl:apply-templates select="child::* except (heading | refpt)"/></xsl:when><xsl:otherwise><xsl:apply-templates select="child::* except (heading | refpt)"/></xsl:otherwise></xsl:choose></bodytext></xsl:if></note></xsl:template>
paul: this is a template that merges sibling glp:notes into <notes> wrapper. add your stream id if you want to use it rather than the generic above
JD: Note that in order to merge this must NOT be called from a for-each; see below template
JD: 2017-08-10: added 'leg:histnote' as well, as (at least in NZ06) these are grouped under the same <notes> wrapper.
<xsl:template match="glp:note[$streamID=('AU10','NZ06','NZ13','NZ18')] | leg:histnote[$streamID=('AU10','NZ06','NZ13','NZ18')]" name="glp-note-mergesiblings" priority="2"><xsl:choose><xsl:when test=".=''"/><xsl:when test="parent::level or parent::heading/parent::level"><!-- these get mapped to prelim, which can't contain notes plural wrapper --><xsl:call-template name="glp-note-generic"/></xsl:when><!-- when this is the first note and there are following sibling notes to be included in it, create wrapper --><xsl:when test="not(preceding-sibling::*[1][self::glp:note or self::leg:histnote]) and (following-sibling::glp:note or following-sibling::leg:histnote)"><notes><xsl:call-template name="glp-note-generic"/><!-- JD: replacing this for-each to (a) include leg:histnote and (b) limit to immediate siblings --><!--<xsl:for-each select="following-sibling::*[name()='glp:note']/preceding-sibling::glp:note">--><xsl:for-each select="following-sibling::glp:note[preceding-sibling::*[1][name()=('glp:note','leg:histnote')]] | following-sibling::leg:histnote[preceding-sibling::*[1][name()=('glp:note','leg:histnote')]]"><xsl:call-template name="glp-note-generic"/></xsl:for-each></notes></xsl:when><!-- when the immediate preceding sibling is a glp:note it will have been grouped above, do nothing --><xsl:when test="preceding-sibling::*[1][self::glp:note or self::leg:histnote]"/><!-- otherwise, process in generic fashion --><xsl:otherwise><xsl:call-template name="glp-note-generic"/></xsl:otherwise></xsl:choose></xsl:template>
Template
glp:note[$streamID=('NZ06','NZ13') and parent::leg:bodytext and not(preceding-sibling::*[1][name()=('glp:note','leg:histnote')])]
| leg:histnote[$streamID=('NZ06','NZ13') and parent::leg:bodytext and not(preceding-sibling::*[1][name()=('glp:note','leg:histnote')])]
glp-note-mergesiblings-from-loop
Documentation
Description
JD: 2017-08-08: new template to group multiple contiguous <glp:note> and <leg:histnote> under <notes>
when called from a for-each-group (e.g., under <leg:bodytext> created from template priority="30" in /modules/nonamespace/Rosetta_endnote-LxAdv-endnote.xsl)
Namespace
No namespace
Match
glp:note[$streamID=('NZ06','NZ13') and parent::leg:bodytext and not(preceding-sibling::*[1][name()=('glp:note','leg:histnote')])]
| leg:histnote[$streamID=('NZ06','NZ13') and parent::leg:bodytext and not(preceding-sibling::*[1][name()=('glp:note','leg:histnote')])]
<xsl:template match="glp:note[$streamID=('NZ06','NZ13') and parent::leg:bodytext and not(preceding-sibling::*[1][name()=('glp:note','leg:histnote')])] | leg:histnote[$streamID=('NZ06','NZ13') and parent::leg:bodytext and not(preceding-sibling::*[1][name()=('glp:note','leg:histnote')])] " name="glp-note-mergesiblings-from-loop" priority="3"><xsl:choose><xsl:when test=".=''"/><!-- if no content do nothing --><xsl:when test="parent::level or parent::heading/parent::level"><!-- these get mapped to prelim, which can't contain notes plural wrapper --><xsl:call-template name="glp-note-generic"/></xsl:when><!-- when this is the first note and there are following sibling notes to be included in it, create wrapper --><xsl:when test="not(preceding-sibling::*[1][self::glp:note or self::leg:histnote]) and (following-sibling::*[1][name()=('glp:note','leg:histnote')])"><notes><!-- process the first note --><xsl:call-template name="glp-note-generic"/><!--
group immediate sibling notes (logic modified from https://gist.github.com/empo/1105204 )
--><xsl:variable name="children" select="following-sibling::glp:note | following-sibling::leg:histnote"/><xsl:for-each select="following-sibling::*"><xsl:variable name="index" select="position()"/><xsl:if test=" generate-id( . ) = generate-id( $children[$index] )"><xsl:call-template name="glp-note-generic"/></xsl:if></xsl:for-each></notes></xsl:when><!-- when the immediate preceding sibling is a glp:note it will have been grouped above, do nothing --><xsl:when test="preceding-sibling::*[1][self::*[name()=('glp:note','leg:histnote')]]"/><!-- otherwise, process in generic fashion --><xsl:otherwise><xsl:call-template name="glp-note-generic"/></xsl:otherwise></xsl:choose></xsl:template>
Template
text/glp:note[$streamID='CA01' or $streamID='CA02CC' or $streamID='CA04' ]
Documentation
Description
If glp:note is the child of text then
glp:note becomes inlinenote with
attribute @notetype="editor-note"
If p/text is the child of glp:note then
conversion should suppress p/text element only and PCDATA of this
directly goes into inlinenote.
Source XML
<p>
<text>
<glp:note>
<p nl="0">
<text>[Editor's note: Figure 1 could not be reproduced online. Please
contact Quicklaw Customer Service at 1-800-387-0899 or service@quicklaw.com and request
the following document: 07aeub57Figure1.doc]</text>
</p>
</glp:note> A number of area residents expressed opposition to the proposed wells, as described below.
</text>
</p>
Target XML
<p>
<text>
<inlinenote notetype="editor-note">
[Editor's note: Figure 1 could not be reproduced online.
Please contact Quicklaw Customer Service at 1-800-387-0899 or service@quicklaw.com and
request the following document: 07aeub57Figure1.doc]
</inlinenote> A number of area residents expressed opposition to the proposed wells, as described below.
</text>
</p>
<xsl:template match="text/glp:note[$streamID='CA01' or $streamID='CA02CC' or $streamID='CA04' ]"><inlinenote><xsl:attribute name="notetype"><xsl:text>editor-note</xsl:text></xsl:attribute><xsl:apply-templates/></inlinenote></xsl:template>
Template
emph/glp:note[$streamID='CA01']
Documentation
Description
If glp:note is the child of emph then glp:note becomes inlinenote with attribute @notetype="editor-note"
If p/text is the child of glp:note then
conversion should suppress p/text element only and PCDATA of this
directly goes into inlinenote.
Source XML
<p indent="1st-line">
<text>
<emph typestyle="bf">
<glp:note>
<p>
<text>
[Editor's note: Appendix A could not be reproduced online. Please contact Quicklaw Customer
Service at 1-800-387-0899 or service@quicklaw.com and request the following document:
07bcl217.doc.]</text>
</p>
</glp:note>
</emph>
</text>
</p>
Target XML
<p indent="1st-line">
<text>
<emph typestyle="bf">
<inlinenote notetype="editor-note">
[Editor's note: Appendix A could not be reproduced online. Please contact Quicklaw Customer
Service at 1-800-387-0899 or service@quicklaw.com and request the following document:
07bcl217.doc.]
</inlinenote>
</emph>
</text>
</p>
<xsl:template match="h"><xsl:choose><!-- MDS 2017-05-12 - Added to match DT Output --><xsl:when test="$streamID = 'UK08CA' and parent::entry"><xsl:apply-templates/></xsl:when><xsl:when test="$streamID='UK06'"><h><xsl:apply-templates select="@*|node()"/></h></xsl:when><!-- 2017-10-19 MDS: Added handling for parent:clause[parent::frm:div] --><xsl:when test="(parent::bodytext|parent::blockquote|parent::frm:*|parent::clause)[parent::form|parent::frm:*|parent::clause[ancestor::frm:divs]]"><form:h><xsl:if test="@l"><xsl:attribute name="level"><xsl:value-of select="@l"/></xsl:attribute></xsl:if><xsl:copy-of select="@* except (@typesize|@l)"/><xsl:apply-templates select="node()"/></form:h></xsl:when><!-- 20170601: MCJ: Excluding AU06 from this condition because the regulation schema does not support base:entry/base:toc. --><!-- JL added AU05 --><!-- 2017-11-15: JD: Excluding UK01.
Rather than add all to this exclude list maybe we should specifically INCLUDE what we want(?)
--><!-- 2017-11-16 - CSN: Added UK03. webstar 7050317.
Totally agree with JD above. This logic is backwards. --><xsl:when test="parent::entry and not($streamID = ('AU05','AU06','AU15','NZ09','UK01','UK03','UK09','NZ12','UK07'))"><xsl:element name="toc"><xsl:element name="toc-entry"><heading><xsl:if test="@l"><xsl:attribute name="level"><xsl:value-of select="@l"/></xsl:attribute></xsl:if><!-- SEP 2015-08-06 looks like there was a missing @ here, added it --><xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if><title><xsl:apply-templates/></title></heading></xsl:element></xsl:element></xsl:when><xsl:when test="child::inlineobject"><figure><!-- SEP 2015-08-06 looks like there was a missing @ here, added it --><xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if><xsl:apply-templates/></figure></xsl:when><!-- MDS - 2017-05-05 - As specified in '/comm/UK08_QUASI_ReguMate_COMMTOADMINDOC-Body.xsl' --><xsl:when test="$streamID = 'UK08CA' and emph/inlineobject"><xsl:apply-templates select="node()"/></xsl:when><!-- 2017-12-18 - CSN - Webstar 7074749 - Remove typeofcase. Handled in that module. --><xsl:when test="(parent::case:decisionsummary) and $streamID='UK03'"><bodytext><h><xsl:apply-templates select="@*|node()"/></h></bodytext></xsl:when><xsl:otherwise><xsl:choose><xsl:when test="contains(lower-case($docinfoidtext),'overview') and //source_cttr:annotations[@id='OP15']/heading/note/h[@id='OP15A']"><xsl:apply-templates/></xsl:when><xsl:when test="contains(lower-case($docinfoidtext),'analytics') and parent::comm:citations and $streamID='AU20'"><xsl:apply-templates/></xsl:when><xsl:otherwise><h><xsl:if test="@l"><xsl:attribute name="level"><xsl:value-of select="@l"/></xsl:attribute></xsl:if><!-- SEP 2015-08-06 looks like there was a missing @ here, added it --><xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute></xsl:if><xsl:apply-templates/></h></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:template>
Template
bodytext/heading[not($streamID='CA14' or $streamID='USLPA')]
Documentation
Description
heading becomes heading and bodytext/heading becomes h. The attributes of heading are handled as
follows:
heading/@inline is suppressed if target is h. Otherwise, heading/@inline becomes heading/@inline. The valid values for
@inline are:
"true"
"false"
heading/@align becomes heading@align. The valid values for
@align are:
"left"
"right"
"center"
heading/@searchtype should be suppressed.
Note: Conversion should not create consecutive heading elements. When 2 or more sibling source elements map to
heading, the data should be merged into a single heading element unless this would
interfere with content ordering.
<xsl:template match="bodytext/heading[not($streamID='CA14' or $streamID='USLPA')]"><!-- @SBy: this rule added based on the QC XSLT --><h><xsl:choose><xsl:when test="$streamID=('UK07','AU14','HK07')"><xsl:apply-templates select="title | subtitle" mode="bodytext_heading"/></xsl:when><xsl:otherwise><xsl:apply-templates select="@* | node()"/><!-- ... When 2 or more sibling source elements map to <targetxml>heading</targetxml>, the data should be merged into a single <targetxml>heading</targetxml> element unless this would interfere with content ordering.</note> --><xsl:for-each select="following-sibling::node()[1][ self::heading ]"><xsl:call-template name="combineSiblingsOfSameName"/></xsl:for-each></xsl:otherwise></xsl:choose></h></xsl:template>
<xsl:template match="heading"><!-- Original Target XPath: heading --><heading><!-- MDS 2017-05-05 - Added 'except(refpt) due to UK08CA source markup
JL added leg:empleg to except list - it's addressed elsewhere and not valid here ever --><xsl:apply-templates select="@* | node() except (refpt | leg:empleg)"/><!-- ... When 2 or more sibling source elements map to <targetxml>heading</targetxml>, the data should be merged into a single <targetxml>heading</targetxml> element unless this would interfere with content ordering.</note> --><xsl:for-each select="following-sibling::node()[1][ self::heading ]"><xsl:call-template name="combineSiblingsOfSameName"/></xsl:for-each><xsl:if test="$streamID=('UK06','UK12')"><xsl:apply-templates select="following-sibling::note"/></xsl:if></heading></xsl:template>
<li><sourcexml>heading/@searchtype</sourcexml> should be suppressed.</li>
<li><sourcexml>heading/@inline</sourcexml> is suppressed if target is <targetxml>h</targetxml>. Otherwise, ...
... When 2 or more sibling source elements map to <targetxml>heading</targetxml>, the data should be merged into a single <targetxml>heading</targetxml> element unless this would interfere with content ordering.</note>
Template
inlineobject[@filename = $inlineobjFilesToSuppress][parent::remotelink][not(parent::remotelink/parent::ci:content)
or $streamID=('AU08', 'AU04', 'AU10', 'AU09')]
Documentation
Description
Instructions [common element]
If the inlineobjectis not a diagram or picture illustrating textual material (e.g. a minor icon or
symbol that is not otherwise suppressed), inlineobject becomes
ref:inlineobject.
Create ref:locator and describe as:
Create ref:locator-key and describe as:
Create ref:key-name with
@name="object-key". This line is hard coded.
Create ref:key-value with
@value, as follows:
If inlineobject[@smi] is present, then
@value is copied from
inlineobject[@filename].
If inlineobject[@smi] is not present, then
@value="X-Y-Z", where X is LNI, Y is SMI, and Z is
filename. LNI and SMI(retreived from CSSM) values are added by "Workflow
Generic Image Handlers". The last component "Z" is copied from
inlineobject[@filename].
Note:
If inlineobject[@smi] still add the @filename value as the value of ref:key-value/@value.
The correct format of the value will be established using the Generic Image Handler
process downstream.
If inlineobject[@smi] is not present, conversion
program should pass inlineobject[@filename] value to
“Generic Image Handler” as is and “Generic Image Handler”
will do conversion of filename value as noted above. Conversion of
filename replaces underscore, blank, and period with hyphen.
Create ref:locator-params and describe as:
Create proc:param[@name] and
proc:param[@value] pairs as follows:
proc:param[@name="componentseq"] with the attribute
@value="1". This line is hard coded.
proc:param[@name="object-type"] with the attribute
@value="image" if the extension of
inlineobject[@filename] is either of these values
(.jpg, .gif, .png, .tiff and .bmp).
proc:param[@name="object-smi"] with the attribute
@value. The @value value is
from inlineobject[@smi]. If
inlineobject[@smi] is not present, obtain SMI from
CSSM. This @value assignment is done by conversion
program.
Note:
If inlineobject[@smi] is not present, add the following proc:param markup:
@name='external-or-local' @value='external'
@name='object-server' @value='Blobstore'
@name='object-pguid' @value='urn:contentitem'
The other attributes of inlineobject are handled as follows:
In the case of icons or other boilerplate images, the inlineobject
shall usually be suppressed from conversion and a corresponding product requirement
should
be created with instructions to instantiate the image on retrieval based on
information/semantic markup in the document. This will sometimes include additional
attributes being added to target elements created from parent source elements (such
as
ref:crossreference from remotelink).
Usually, any icons encountered from the list below should be suppressed. These files
should be suppressed for both *.gif and *.png file types.
1.gif
2.gif
3.gif
4.gif
5.gif
IconSignalPositive.gif
IconSignalNegative.gif
IconSignalNeutral.gif
IconSignalPossibleNegative.gif
IconSignalCiteInfoOnly.gif
cbcc.gif
leg1.gif
mb.gif
au_repealed.gif
au_exclaim.gif
Use cases where the LBU feels the product requirement cannot be met if the markup
is
completely suppressed shall be handled case-by-case, and as usual additional topics
will
contain specific instructions for these scenarios that override the instructions in
this
note.
created 2 global parameters to be used in driver,
<xsl:param name="inlineobjBoilerplateFiles" select="('xxx.gif', 'xxx.png')"/> for boilerplate filenames that ARE
to be converted to ref:inlineobject.
<xsl:param name="inlineobjFilesToSuppress" select="('yyy.png', 'yyy.gif')"/> for filenames that are to be
*SUPPRESSED* from conversion but require special handling elsewhere. That other handling is not specified in this module
This will allow us to be LBU-specific in names of files for specific handling.
ALSO REFACTORED this template to a MODE and not a named template so it works for figures as well.
JL
Awantika: Added name for the template to be used in element 'p'
JL Suppression is done when inlineobject is a child of remotelink and the grandparent of inlineobject (the parent of remotelink) is not ci:content.
from DITA/ConversionInstructions/Rosetta/common_newest/Rosetta_AU_legistlation_courtrule_inlineobject-Chof-remotelink-LxAdv-SUPPRESS.dita
Namespace
No namespace
Match
inlineobject[@filename = $inlineobjFilesToSuppress][parent::remotelink][not(parent::remotelink/parent::ci:content)
or $streamID=('AU08', 'AU04', 'AU10', 'AU09')]
<xsl:template match="inlineobject" mode="refinline"><xsl:param name="bpf_from_case_filenum" tunnel="yes"/><ref:inlineobject><xsl:choose><xsl:when test="$streamID='USLPA'"><ref:locator><ref:locator-key><!-- Awantika: ref:key-value should be the sibling of ref:key-name --><ref:key-name><xsl:attribute name="name">object-key</xsl:attribute></ref:key-name><ref:key-value><xsl:attribute name="value"><xsl:value-of select="@filename"/></xsl:attribute></ref:key-value></ref:locator-key><ref:locator-params><proc:param><xsl:attribute name="name">componentseq</xsl:attribute><xsl:attribute name="value">1</xsl:attribute></proc:param><xsl:if test="contains(@filename, 'jpg') or contains(@filename, 'jpeg') or contains(@filename, 'gif') or contains(@filename, 'png') or contains(@filename, 'tiff') or contains(@filename, 'bmp')"><proc:param><xsl:attribute name="name">object-type</xsl:attribute><xsl:attribute name="value">image</xsl:attribute></proc:param></xsl:if><xsl:choose><!--
Paul: Wondering if SMI should be a param just like dpsi. Its going to get dropped unless something is done.
--><xsl:when test="@smi"><proc:param><xsl:attribute name="name">object-smi</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@smi"/></xsl:attribute></proc:param></xsl:when><xsl:when test="not(@smi) and $streamID=('AU16','CA05','CA09','CA06','AU07', 'AU09','USLPA')"><proc:param><xsl:attribute name="name">object-smi</xsl:attribute><xsl:attribute name="value"/></proc:param><xsl:comment>Empty @value created by 'Rosetta_inlineobject-LxAdv-ref.inlineobject.xsl'</xsl:comment></xsl:when><xsl:otherwise><!-- Paul: commented out these params, they are for blobstore. they should be done via this template in Rosetta_inlineobject-to-LxAdv_figure_ref.inlineobject
<xsl:template match="inlineobject" name="inlineobjblobstore">
<proc:param>
<xsl:attribute name="name">external-or-local</xsl:attribute>
<xsl:attribute name="value">external</xsl:attribute>
</proc:param>
<proc:param>
<xsl:attribute name="name">object-server</xsl:attribute>
<xsl:attribute name="value">Blobstore</xsl:attribute>
</proc:param>
<proc:param>
<xsl:attribute name="name">object-pguid</xsl:attribute>
<xsl:attribute name="value">urn:contentitem:</xsl:attribute>
</proc:param>
--></xsl:otherwise></xsl:choose></ref:locator-params></ref:locator></xsl:when><xsl:otherwise><xsl:apply-templates select="@*[not(name()='attachment' or name()='key')]" mode="refinline"/><xsl:apply-templates select="@attachment|@key" mode="refinline"/><ref:locator><ref:locator-key><!-- Awantika: ref:key-value should be the sibling of ref:key-name --><ref:key-name><xsl:attribute name="name"><xsl:value-of select="if ($streamID='CA19x' or $streamID='AU19_CC') then 'attachment-key' else 'object-key'"/></xsl:attribute></ref:key-name><ref:key-value><xsl:attribute name="value"><xsl:value-of select="@filename"/></xsl:attribute></ref:key-value></ref:locator-key><ref:locator-params><proc:param><xsl:attribute name="name">componentseq</xsl:attribute><xsl:attribute name="value">1</xsl:attribute></proc:param><xsl:if test="contains(@filename, 'jpg') or contains(@filename, 'jpeg') or contains(@filename, 'gif') or contains(@filename, 'png') or contains(@filename, 'tiff') or contains(@filename, 'bmp')"><proc:param><xsl:attribute name="name"><xsl:value-of select="if ($streamID='CA19x' or $streamID='AU19_CC') then 'attachment-type' else 'object-type'"/></xsl:attribute><xsl:attribute name="value">image</xsl:attribute></proc:param></xsl:if><xsl:choose><!--
Paul: Wondering if SMI should be a param just like dpsi. Its going to get dropped unless something is done.
JD: the CI examples state "This @value assignment is done by conversion program"
--><xsl:when test="@smi"><proc:param><xsl:attribute name="name">object-smi</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@filename"/></xsl:attribute></proc:param></xsl:when><xsl:when test="not(@smi) and $streamID='CA19' or $streamID='AU19_CC' or $streamID='AU18'"><!--these Apollo SMI values come from a John B. email:
PCT PCSI Name SMI
urn:pct:444 232583 Pleadings 10909
urn:pct:442 232585 Facta 10912
urn:pct:443 232584 Motions 100132
--><proc:param><xsl:attribute name="name">object-smi</xsl:attribute><xsl:choose><xsl:when test="$bpf_from_case_filenum = 'brief'"><xsl:attribute name="value">10912</xsl:attribute></xsl:when><xsl:when test="$bpf_from_case_filenum = 'pleading'"><xsl:attribute name="value">10909</xsl:attribute></xsl:when><xsl:when test="$bpf_from_case_filenum = 'motion'"><xsl:attribute name="value">100132</xsl:attribute></xsl:when><xsl:otherwise><xsl:attribute name="value"><xsl:value-of select="'unk'"/></xsl:attribute></xsl:otherwise></xsl:choose></proc:param></xsl:when><!-- Awantika:2017-11-14- Added CA01 to the streams for webstar 7044267 --><xsl:when test="not(@smi) and not(starts-with($streamID, 'UK')) and not(starts-with($streamID , 'HK'))"><proc:param><xsl:attribute name="name">object-smi</xsl:attribute><xsl:attribute name="value" select="$smi"/></proc:param><xsl:comment>Empty @value created by 'Rosetta_inlineobject-LxAdv-ref.inlineobject.xsl'</xsl:comment></xsl:when><xsl:otherwise><!-- Paul: commented out these params, they are for blobstore. they should be done via this template in Rosetta_inlineobject-to-LxAdv_figure_ref.inlineobject
<xsl:template match="inlineobject" name="inlineobjblobstore">
<proc:param>
<xsl:attribute name="name">external-or-local</xsl:attribute>
<xsl:attribute name="value">external</xsl:attribute>
</proc:param>
<proc:param>
<xsl:attribute name="name">object-server</xsl:attribute>
<xsl:attribute name="value">Blobstore</xsl:attribute>
</proc:param>
<proc:param>
<xsl:attribute name="name">object-pguid</xsl:attribute>
<xsl:attribute name="value">urn:contentitem:</xsl:attribute>
</proc:param>
--></xsl:otherwise></xsl:choose></ref:locator-params></ref:locator></xsl:otherwise></xsl:choose><!-- Awantika: Commented xsl:copy as it was copying the attributes of inlineobject which are not used in target --><!--<xsl:copy-of select="@*[not(name()='attachment' or name()='key')]"/>--></ref:inlineobject></xsl:template>
Template
inlineobject[not(@filename=$inlineobjFilesToSuppress or @filename=$inlineobjBoilerplateFiles
or parent::blockquote or parent::dispformula )]
Documentation
Description
Instructions [common element]
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
If the inlineobjectis a diagram or picture illustrating textual material (e.g. not a minor icon
or symbol), inlineobject becomes
figure/ref:inlineobject.
Note: When inlineobject is a child of
verbatim then conversion should suppress
proc:nl from before and after of
figure element in the target. For more clarification see
Example: 3.
<p>
<text>
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-sch2"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
</text>
</p>
Source XML 3: <nl/> before and after <inlineobject>
<p>
<text>
<verbatim verbatimclass="future">
...
<nl/> 26. Each of the provisions of the Act listed in
Column A of the<nl/> Table to this section is amended in the manner specified for
the<nl/> provision in Column B of the Table.<nl/>
<inlineobject filename="SO13_18FT-0001.jpg" type="image" attachment="ln-server"/><nl/>
<inlineobject filename="SO13_18FT-0002.jpg" type="image" attachment="ln-server"/><nl/>
<inlineobject filename="SO13_18FT-0003.jpg" type="image" attachment="ln-server"/><nl/>
SOLICITORS ACT<nl/>
<nl/> 27. (1) Section 1 of the Solicitors Act is amended by striking<nl/> out "If a
person, unless a party to the proceeding, commences" at the<nl/> beginning and
substituting "Subject to subsection (2), if a person<nl/> commences".<nl/>
</verbatim>
</text>
</p>
Target XML 3: <nl/> before and after <inlineobject>
<p>
<text>
<verbatim verbatimclass="future">
...
<proc:nl/> 26. Each of the provisions of the Act listed in
Column A of the<proc:nl/> Table to this section is amended in the manner specified for
the<proc:nl/> provision in Column B of the Table.
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-SO13_18FT-0001"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-SO13_18FT-0002"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-SO13_18FT-0003"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
SOLICITORS ACT<proc:nl/>
<proc:nl/> 27. (1) Section 1 of the Solicitors Act is amended by striking<proc:nl/> out "If a
person, unless a party to the proceeding, commences" at the<proc:nl/> beginning and
substituting "Subject to subsection (2), if a person<proc:nl/> commences".<proc:nl/>
</verbatim>
</text>
</p>
created 2 global parameters to be used in driver,
<xsl:param name="inlineobjBoilerplateFiles" select="('xxx.gif', 'xxx.png')"/> for boilerplate filenames that ARE
to be converted to ref:inlineobject.
<xsl:param name="inlineobjFilesToSuppress" select="('yyy.png', 'yyy.gif')"/> for filenames that are to be
*SUPPRESSED* from conversion but require special handling elsewhere. That other handling is not specified in this module
When the @filename attribute of inlineobject is not on either of those lists, we will output the figure wrapper in this module.
This will allow us to be LBU-specific in names of files for specific handling.
JL
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_inlineobject-LxAdv-figure_ref.inlineobject.dita
<xsl:template match="inlineobject[not(@filename=$inlineobjFilesToSuppress or @filename=$inlineobjBoilerplateFiles or parent::blockquote or parent::dispformula )]"><!-- Paul: I removed this bodytext parent check from the not() part of the match predicate.
It was causing objects to get suppressed.
"or parent::bodytext"
FYI:
parent::blockquote seems to be handled by <xsl:template match="blockquote[inlineobject and not(inlinobject/following-sibling::* or inlineobject/preceding-sibling::*)]">
parent::dispformula is handled by <xsl:template match="dispformula">
--><xsl:variable name="blobstoreStreams" select="('UK01','UK02','UK03', 'UK04', 'UK05', 'UK06', 'UK07', 'UK08CA', 'UK08OR', 'UK09', 'UK10', 'UK11DA', 'UK11DN', 'UK12', 'UK14', 'UK15', 'UK15', 'UK16', 'UK17', 'UK17', 'UK18', 'UK22CF', 'UK22CS','HK01','HK02', 'HK03','HK04','HK05','HK06','HK07','HK08', 'HK09' )"/><!-- Paul: I removed 2 non-uk streams from the $blobstoreStreams.
I'm pretty sure people were only doing this to get the "when" behavior below instead of the "otherwise".
They aren't blobstore streams. See otherwise clause comment. I know the otherwise <figure> output is difference from DT but i think that may be incorrect.
As of 2017-05-27, the ONLY blobstore streams are UK. No other LBU has moved there yet.
, 'CA19', 'AU04'
--><xsl:choose><!-- JL added to handle some UK streams that use blobstore; the test for link parent ensures the output is valid
as figure isn't valid in ref:marker
--><xsl:when test="$streamID=$blobstoreStreams"><!-- JD: 2017-06-08: similar to Paul's note below, UK08CA is adding a <figure> wrapper;
I assume this is because the overlapping conditions in CCCC-10540 and CCCC-10368),
including this dubious instruction:
"If the inlineobject is a diagram or picture illustrating textual material (e.g. not a minor icon or symbol), inlineobject becomes figure/ref:inlineobject."
(how are we or the XSLT processor to know whether the image is a diagram or picture illustrating textual material?)
For now, hacking with additional xsl:when clause
--><xsl:choose><xsl:when test="parent::h[$streamID='UK09']"><xsl:call-template name="inlineobjblobstore"/></xsl:when><xsl:when test="parent::link | parent::figure | parent::emph | parent::publication and not(parent::emph/parent::h) or (parent::text and $streamID=('UK08CA','UK11DA','UK06'))"><xsl:call-template name="inlineobjblobstore"/></xsl:when><!-- JD: 2017-10-31: when ancestor is figure the <figure> element has already been created.
This may be brittle; the source is:
<figure>
<p>
<text>
<inlineobject ...>
</text>
</p>
</figure>
--><xsl:when test="$streamID=('UK01','UK08OR') and ancestor::figure"><xsl:call-template name="inlineobjblobstore"/></xsl:when><xsl:otherwise><xsl:choose><!-- Awantika: Added condition when parent is case:judgements for HK03 --><xsl:when test="$streamID='HK03' and parent::case:judgments"><attachments><appendix><bodytext><figure><xsl:call-template name="inlineobjblobstore"/></figure></bodytext></appendix></attachments></xsl:when><xsl:otherwise><figure><xsl:call-template name="inlineobjblobstore"/></figure></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><!-- Paul: DT seems to be omitting the figure wrapper. is this correct? --><xsl:choose><xsl:when test="$streamID = ('AU16') or parent::figure[$streamID= ('AU15' , 'AU05', 'NZ12', 'AU18')] or parent::remotelink[ ( @service = 'URL' or @href ) and not( ( contains( . , 'www' ) or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ) ]"><xsl:apply-templates select="." mode="refinline"/></xsl:when><!-- 20170607: MCJ: Added condition for AU06. I am not sure why this wouldn't be the default handling (to avoid a figure within a figure) but
don't want to affect other streams. --><xsl:when test="($streamID = 'AU06') or ($streamID = 'NZ05') or ($streamID='AU19_CC')"><xsl:choose><!-- this condition is probably not complete in terms of preventing a double wrapper for 'figure'. The test for an ancestor figure will
cover most things but could also cause trouble if there are constructs in between the outer wrapper and the current
inline object that need different handling. This module could use some refactoring (not just for this stream area). --><xsl:when test="(./parent::leg:bodytext or ./parent::li or ./parent::text or ./parent::legfragment) and not(ancestor::figure)"><figure><xsl:apply-templates select="." mode="refinline"/></figure></xsl:when><xsl:otherwise><xsl:apply-templates select="." mode="refinline"/></xsl:otherwise></xsl:choose></xsl:when><!-- JD: probably more applicable, but setting to AU11 for now. leg:bodytext/inlineobject would need to create primlaw:bodytext/p/text/figure --><xsl:when test="$streamID='AU11' and parent::leg:bodytext"><p><text><figure><xsl:apply-templates select="." mode="refinline"/></figure></text></p></xsl:when><!-- JD: probably more applicable, but settting to NZ18 for now. Do not create <figure> wrapper when under <lnci:content> --><xsl:when test="$streamID='NZ18' and parent::remotelink/parent::ci:content"><xsl:apply-templates select="." mode="refinline"/></xsl:when><xsl:when test="$streamID='AU04' and preceding-sibling::*[1][self::ci:cite]"><xsl:apply-templates select="." mode="refinline"/></xsl:when><xsl:when test="parent::figure"><xsl:apply-templates select="." mode="refinline"/></xsl:when><!-- Awantika: 2017-12-28- Added when condition for ancestor figure as two wrappers for figure
were being created. Webstar # 7080120--><xsl:when test="ancestor::figure and $streamID='AU04'"><xsl:apply-templates select="." mode="refinline"/></xsl:when><xsl:otherwise><figure><xsl:apply-templates select="." mode="refinline"/></figure></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:template>
Template
inlineobjectinlineobjblobstore
Documentation
Description
JL Included template name inlineobjblobstore from another module with DITA instructions
<dita:topic xmlns="http://dita.oasis-open.org/architecture/2005/" id="Rosetta_inlineobject-to-LexisAdvance_ref.inlineobject_BLOBSTORE">
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
h/inlineobject becomes
figure/ref:inlineobject. The attributes of
h are handled as follows:
<xsl:template match="h/@align" priority="2"><!-- wpk 2017-12-13. webstar 7067569.
Changed priority to 2.
The base "nonamespace/Rosetta_h-LxAdv-h.xsl" has this identical template. Ideally it should be removed here so
as to avoid amiguous match when both are included.
There are streams in which the base module is not used but this module is used. So we cannot rely on the common exclusively.
In order to ensure no side effects and to avoid ambiguity, the priority is changed to 2.--><xsl:attribute name="align"><xsl:value-of select="."/></xsl:attribute></xsl:template>
Template
sub[inlineobject]
Documentation
Description
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
<p>
<text>
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-SA-ACT-1984-3-PIC2"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
</text>
</p>
When source is having emph followed by inlineobject inside base:h element
h/emph/inlineobjectthan in Target it should Map with and becomes
emph/ref:inlineobject.
<h>
<emph typestyle="bf">Table 2 Estimation of regression coefficients using the SUR model
<inlineobject type="image" mimetype="image/gif" filename="JFRC_2005_Vol13_Issue2_May_167_1.gif" />
</emph>
</h>
Becomes
<emph typestyle="bf">Table 2 Estimation of regression coefficients using the SUR model
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-JFRC_2005_Vol13_Issue2_May_167_1"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</emph>
When source is having emph followed by another emph of same typestyle and then
followed by inlineobject sup/emph/emph/inlineobjectthan in
Target it should drop one emph and the followed
emph/inlineobject should directly Map it with and becomes
sup/emph/ref:inlineobject.
<row>
<entry>
<sup>
<emph typestyle="it">
<emph typestyle="it">
<inlineobject type="image" mimetype="image/gif" filename="ALE_2014_Vol16_Issue2_Sep_433_1.gif" />
</emph>
</emph>
</sup>
</entry>
<entry>(1)</entry>
</row>
Becomes
<row>
<entry>
<sup>
<emph>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-ALE_2014_Vol16_Issue2_Sep_433_1"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</emph>
</sup>
</entry>
</row>
When source is having
leg:comntry/level/bodytext/heading/title/emph/inlineobject
then it becomes
annot:annotations/annot:annotation-grp/annot:annotation/bodytext/h/emph/ref:inlineobject.
<leg:comntry searchtype="ANNOTATIONS">
<level leveltype="comm30">
<bodytext>
<heading searchtype="ANNOTATIONS">
<title>
<emph typestyle="bf">
<inlineobject type="image" mimetype="image/gif" filename="img8d4.gif" />NOTES
</emph>
</title>
</heading>
</bodytext>
</level>
</leg:comntry>
Becomes
<annot:annotations>
<annot:annotation-grp grptype="COMMENTARY">
<annot:annotation>
<bodytext>
<h>
<emph typestyle="bf"><ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-img8d4"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>NOTES</emph>
</h>
</bodytext>
</annot:annotation>
</annot:annotation-grp>
</annot:annotations>
Description
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
sub/inlineobject becomes figure/ref:inlineobject. Suppress sub from conversion.
Source XML
<text>
The various language versions of that phrase use the terms
'adscribirse' (Spanish), 'tages sammen' (Danish), 'angehängt'
(German),
'<sub>
<inlineobject type="image" mimetype="image/gif"
filename="img1c4e.gif"/>
</sub>'
(Greek), 'added on'
(English), 'rattachée' (French), 'collegato' (Italian), 'gevoegd
bij' (Dutch), 'ligado' (Portuguese), 'yhteydessä' (Finnish) and
'läggas samman' (Swedish).
</text>
Target XML
<text>
The various language versions of that phrase use the terms
'adscribirse' (Spanish), 'tages sammen' (Danish), 'angehängt'
(German),
'<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-img1c4e"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>'
(Greek), 'added on'
(English), 'rattachée' (French), 'collegato' (Italian), 'gevoegd
bij' (Dutch), 'ligado' (Portuguese), 'yhteydessä' (Finnish) and
'läggas samman' (Swedish).
</text>
<xsl:template match="sub[inlineobject]"><!-- Original Target XPath: figure/ref:inlineobject --><xsl:apply-templates select="node()"/></xsl:template>
Template
inlineobject[parent::dispformula]
Documentation
Description
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
<xsl:template match="inlineobject[parent::dispformula]"><!-- Original Target XPath: formula/ref:inlineobject --><xsl:apply-templates select="." mode="refinline"/></xsl:template>
Template
blockquote[inlineobject and not(inlinobject/following-sibling::node() or inlineobject/preceding-sibling::node())]
Documentation
Description
Note: This topic is used in numerous conversion instructions for several LBUs. It is a shared
topic
rather than duplicated to ensure consistency and accuracy. The xml snippets contained
in this
topic reflect markup needed for the Apollo image handling application. The UK is the
first LBU
to move from Apollo to the Blobstore application for image handling. Therefore, if
this is a UK
conversion instruction document, please refer to the following topics for correct
image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE images
(id-CCCC-10542)
inlineobject to ref:inlineobject for
BLOBSTORE images (id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE images
(id-CCCC-10541)
blockquote[inlineobject and not(inlinobject/following-sibling::node() or inlineobject/preceding-sibling::node())]
Mode
#default
Import precedence
0
Source
<xsl:template match="blockquote[inlineobject and not(inlinobject/following-sibling::node() or inlineobject/preceding-sibling::node())]"><!-- Original Target XPath: p/figure/ref:inlineobject --><p><figure><ref:inlineobject><xsl:apply-templates select="inlineobject" mode="refinline"/></ref:inlineobject></figure></p></xsl:template>
Template
p/blockquote[inlineobject and not(inlinobject/following-sibling::node() or inlineobject/preceding-sibling::node())]
Documentation
Description
Template specific to p/blockquote so a new p wrapper is not created... a better way probably exists to do this.
Namespace
No namespace
Match
p/blockquote[inlineobject and not(inlinobject/following-sibling::node() or inlineobject/preceding-sibling::node())]
Mode
#default
Import precedence
0
Priority
25
Source
<xsl:template match="p/blockquote[inlineobject and not(inlinobject/following-sibling::node() or inlineobject/preceding-sibling::node())]" priority="25"><!-- Original Target XPath: p/figure/ref:inlineobject --><figure><xsl:apply-templates select="." mode="refinline"/></figure></xsl:template>
Template
inlineobject[parent::bodytext]
Documentation
Description
Instructions
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
<bodytext>
<inlineobject type="image" attachment="ln-server" filename="elb31.gif"/>
<p>
<text>The European Court of Justice also found that contracting out arrangements could fall under the Directive...</text>
</p>
...
</bodytext>
Target XML
<bodytext>
<p>
<text>
<figure>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-elb31"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</figure>
</text>
</p>
<p>
<text>The European Court of Justice also found that contracting out arrangements could fall under the Directive...</text>
</p>
...
</bodytext>
Target XML : If insert-line/@character=""
comes in XPATH
bodytext/blockquote/insert-line
<p/>
Note: When insert-line occurs as a child of a
blockquote and the character type is space,
nbsp, or thinsp, then the result is mapped to an empty
p tag.
Source XML
<leg:bodytext> <p> <blockquote>
<insert-line character=" "/> <p
indent="none"><text>Tape reference: <form-chars
character="." num-char="16"/></text></p> <p
indent="none"><text><form-chars character="."
num-char="16"/></text></p> <p
indent="none"><text>Name of complainant: <form-chars
character="." num-char="16"/></text></p> <p
indent="none"><text>Cross reference to other interviews with
complainant: <form-chars character="."
num-char="16"/></text></p> <insert-line character="
"/> <p indent="none"><text>I certify that the contents
of this certificate are correct.</text></p>
<insert-line character=" "/> <p
indent="none"><text><form-chars character="."
num-char="12"/></text></p> <p
indent="none"><text align="center">Signature of
Interviewer<form-chars character=" "
num-char="16"/><form-chars character=" "
num-char="2"/></text></p> <insert-line character="
"/> <p indent="none"><text align="center">Date of
Certificate<form-chars character=" "
num-char="16"/><form-chars character=" "
num-char="2"/></text></p> </blockquote>
</p> </leg:bodytext>
Target XML
<primlaw:bodytext> <p> <blockquote>
<p/> <p indent="none"><text>Tape reference:
<proc:formchars formchar="dot"
formcharuse="longname"/></text></p> <p
indent="none"><text><proc:formchars formchar="dot"
formcharuse="longname"/></text></p> <p
indent="none"><text>Name of complainant: <proc:formchars
formchar="dot" formcharuse="longname"/></text></p>
<p indent="none"><text>Cross reference to other interviews
with complainant: <proc:formchars formchar="dot"
formcharuse="longname"/></text></p> <p/> <p
indent="none"><text>I certify that the contents of this
certificate are correct.</text></p> <p/> <p
indent="none"><text><proc:formchars formchar="dot"
formcharuse="address"/></text></p> <p
indent="none"><text align="center">Signature of
Interviewer<proc:formchars formchar="dot"
formcharuse="longname"/><proc:formchars formchar="dot"
formcharuse="day"/></text></p> <p/> <p
indent="none"><text align="center">Date of
Certificate<proc:formchars formchar="dot"
formcharuse="longname"/><proc:formchars formchar="dot"
formcharuse="day"/></text></p> </blockquote>
</p> </primlaw:bodytext>
MCJ: 2017-08-01: updated predicate to test for not(parent::blockquote) in order to remove ambiguity with other template.
this introduces new holes that will need to be refactored if/when relevant data appears. My guess is that
these templates need to be consolidated so that the transform to proc:nl is the default and the test on
parent::blockquote (and testing @character) becomes exceptions.
JD: 2017-07-25: modified per instruction "insert-line[@character] becomes proc:nl."
xsl:template match="insert-line"
Namespace
No namespace
Match
insert-line[@character and not(parent::blockquote)]
Mode
#default
Import precedence
0
Source
<xsl:template match="insert-line[@character and not(parent::blockquote)]"><!-- Original Target XPath: proc:nl --><proc:nl><xsl:apply-templates select="@* | node()"/></proc:nl></xsl:template>
The child li becomes
listitem. bodytext is the required child element for
listitem. The child lilabel becomes label.
Any h children of the li should be processed as h within the listitem/bodytext. Process the children of h.
Nested lists, when a li contains a l element, the mapping should appear as follows: create list/listitem/bodytext
followed by a list within the bodytext element.
Source XML
<l>
<li>
<lilabel>
<emph typestyle="ro">(1)</emph>
</lilabel>
<p>
<text>The plaintiffs’ application is dismissed.</text>
</p>
</li>
<li>
<lilabel>
<emph typestyle="ro">(2)</emph>
</lilabel>
<p>
<text>The plaintiffs pay the defendant’s costs, including each appearance in the court, as taxed, if not agreed.</text>
</p>
</li>
</l>
Target XML
<list>
<listitem>
<label>
<emph typestyle="ro">(1)</emph>
</label>
<bodytext>
<p>
<text>The plaintiffs’ application is dismissed.</text>
</p>
</bodytext>
</listitem>
<listitem>
<label>
<emph typestyle="ro">(2)</emph>
</label>
<bodytext>
<p>
<text>The plaintiffs pay the defendant’s costs, including each appearance in the court, as taxed, if not agreed.</text>
</p>
</bodytext>
</listitem>
</list>
Nested list Source(l/li/l)
<l>
<li>
<lilabel>•</lilabel>
<p>
<text>the health and safety of workers who are:</text>
</p>
</li>
<li>
<l>
<li>
<lilabel>◦</lilabel>
<p>
<text>engaged by the person conducting the business or undertaking;</text>
</p>
</li>
</l>
</li>
...
Nested list Target (list/listitem/bodytext/list)
<list>
<listitem>
<label>•</label>
<bodytext>
<p>
<text>the health and safety of workers who are:</text>
</p>
</bodytext>
</listitem>
<listitem>
<bodytext>
<list>
<listitem>
<label>◦</label>
<bodytext>
<p>
<text>engaged by the person conducting the business or undertaking;</text>
</p>
</bodytext>
</listitem>
</list>
</bodytext>
</listitem>
...
<xsl:template match="l[not(@virtual-nesting)]"><xsl:choose><!-- Awantika: specific for AU20 --><xsl:when test="$streamID='AU20' and ancestor::source_cttr:annotations[@id='OI7' or @id='OP3']/heading/note/l"><xsl:for-each select="li/p/text"><primlaw:subordinatelaw-item><textitem><xsl:apply-templates select="@* | node()"/></textitem></primlaw:subordinatelaw-item></xsl:for-each></xsl:when><!-- 2017-10-17 - MDS: Added due to Webstar 7025682 --><xsl:when test="parent::l"><xsl:apply-templates select="node()"/></xsl:when><xsl:otherwise><!-- 2017-10-17 - MDS: Removed 'except l' because it was dropping content as found in Webstar 7025682. See when statement 'parent::l'--><xsl:element name="list"><xsl:apply-templates select="@*"/><xsl:if test="$streamID='UK09' and note[not(preceding-sibling::li)]"><listitem><bodytext/></listitem></xsl:if><xsl:apply-templates select="node()"/></xsl:element></xsl:otherwise></xsl:choose></xsl:template>
Template
l[ancestor::frm:body][not(ancestor::footnote or ancestor::note)][$streamID='UK12']
Namespace
No namespace
Match
l[ancestor::frm:body][not(ancestor::footnote or ancestor::note)][$streamID='UK12']
********************************************************************************************
NOTE!
from /XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_refpt-LxAdv-ref.anchor.xsl
this is **GENERIC** behavior. If your stream implements differently, fork template or give a streamID test
<p>If <sourcexml>refpt</sourcexml> comes within <sourcexml>l/li/lilabel</sourcexml>
then <targetxml>ref:anchor</targetxml> will become the first child of
<targetxml>listitem</targetxml>.</p>
- JL
************************************************************************************************
<xsl:template match="l[not(@virtual-nesting)][parent::case:factsummary or parent::case:decisionsummary]" priority="25"><!-- JD: 2017-06-16: removing $streamID test, as this is supposed to be the default handling.
If stream-specific handling is required this should be moved to a stream-specific module. --><!--<xsl:if test="$streamID='HK03'">--><xsl:choose><xsl:when test="$streamID=('NZ04', 'AU13')"><list><xsl:apply-templates select="@* | node()"/></list></xsl:when><!-- JD: UK02 wraps in list when a child of case:decisionsummary but not case:factsummary --><xsl:when test="$streamID=('UK02') and parent::case:decisionsummary"><list><xsl:apply-templates select="@* | node()"/></list></xsl:when><xsl:otherwise><p><list><xsl:apply-templates select="@* | node()"/></list></p></xsl:otherwise></xsl:choose><!--</xsl:if>--></xsl:template>
Template
lilabel[matches(.,'^$') and not(child::*)]
Documentation
Description
Vikas Rohilla : Added template for the empty lilabel
SP : don't apply this rule if child elements exist
Namespace
No namespace
Match
lilabel[matches(.,'^$') and not(child::*)]
Mode
#default
Import precedence
0
Source
<xsl:template match="lilabel[matches(.,'^$') and not(child::*)]"/>
Template
l/@type
Documentation
Description
MDS 207-05-17 - Exception found in AU04 There is no target attribute in <list> for l/@type
<xsl:template match="lilabel/fnr"><footnote><xsl:choose><xsl:when test="$streamID='AU18'"><xsl:element name="ref:anchor"><xsl:attribute name="id"><xsl:value-of select="@fnrtoken"/></xsl:attribute><xsl:attribute name="anchortype"><xsl:text>global</xsl:text></xsl:attribute></xsl:element><label><xsl:apply-templates select="node()"/></label><bodytext><xsl:text><!--Mandatory element per the target schema--></xsl:text></bodytext></xsl:when><xsl:otherwise><!-- Process all attributes except @fnrtoken because fnrtoken produces an element. This does assume that no other
attributes produce elements. --><xsl:apply-templates select="@* except @fnrtoken"/><!-- Now process @fnrtoken as the last attribute since it produces an element. --><xsl:apply-templates select="@fnrtoken"/><xsl:apply-templates select="node()"/></xsl:otherwise></xsl:choose></footnote></xsl:template>
Template
li
Documentation
Description
When li has attribute @level then conversion need to suppress
@level.
When li is immediately followed by a l that list should be brought into the end of the listitem/bodytext.
Source XML having li/@level
<l>
<li level="1">
<lilabel>(a)</lilabel>
<p>
<text>the day on which the person with the claim first knew,</text>
</p>
</li>
</l>
Target XML
<list>
<listitem>
<label>(a)</label>
<bodytext>
<p>
<text>the day on which the person with the claim first
knew,</text>
</p>
</bodytext>
</listitem>
</list>
<xsl:template match="li"><!-- Original Target XPath: listitem --><listitem><xsl:choose><xsl:when test="@id = ''"/><xsl:when test="$streamID='AU18' and ./@id = descendant::refpt/@id"/><xsl:otherwise><xsl:apply-templates select="@id"/></xsl:otherwise></xsl:choose><xsl:apply-templates select="@* except @id"/><xsl:apply-templates select="lilabel/refpt"/><xsl:apply-templates select="lilabel"/><bodytext><!--
<xsl:apply-templates select="* except lilabel"/>
--><xsl:choose><xsl:when test="$streamID=('AU10','NZ11')"><!-- WPK 2017-12-08. In pacific PG, glp:notes can become margin notes.
However they are not done by creating new <p><text><marginnote> for each note.
The margin notes are all placed inside the preceding <p><text> (already created text node).
This is achieved by applying following-sibling glp:note from within the first p/text.
Since the following sibling is done there, applying templates here will create duplicates.
So this "when" clause prevents duplication of margin notes.
4.2.2.3. heading (id-CCCC-10182)
1. bodytext/glp:note[notetype="xref"] becomes seclaw:bodytext/p/text/marginnote. New p and text elements are not created;
instead, the newly created marginnote is placed in the p that was mapped from the preceding sibling p of glp:note[notetype="xref"]. Within
this p the marginnote is placed within the text element that was mapped from the preceding sibling p element's last existing child text element.
2. li/glp:note[notetype="xref"] becomes listitem/bodytext/p/text/marginnote. Within the listitem/bodytext, new p
and text elements are usually not created; instead, the newly created marginnote is placed in the p that was mapped from the preceding sibling p of
glp:note[notetype="xref"]. Within this p the marginnote is placed within the text element that was mapped from the preceding sibling p
element's last child text source element. A new text element will need to be created if and only if the glp:note[notetype="xref"] occurs in
an li before any sibling p in the li (because in this case there would be no li/p that precedes the li/glp:note).
--><xsl:apply-templates select="* except (lilabel | glp:note[@notetype='xref'][preceding-sibling::*[1][self::p[text[not(*) and normalize-space(.)!='']] or self::glp:note[@notetype='xref']]])"/></xsl:when><xsl:otherwise><xsl:apply-templates select="* except lilabel"/></xsl:otherwise></xsl:choose><xsl:if test="following-sibling::*[1][self::l]"><xsl:apply-templates select="following-sibling::*[1][self::l]" mode="nested-list"/></xsl:if></bodytext></listitem></xsl:template>
Template
lnested-list
Documentation
Description
JL: change to handle potential multiple nested consecutive lists between lis
Namespace
No namespace
Match
l
Mode
nested-list
Import precedence
0
Source
<xsl:template match="l" mode="nested-list"><xsl:choose><xsl:when test="ancestor::frm:body and not(ancestor::footnote or ancestor::note)"><form:list><xsl:apply-templates/></form:list></xsl:when><xsl:otherwise><list><xsl:apply-templates/></list></xsl:otherwise></xsl:choose><xsl:if test="following-sibling::*[1][self::l]"><xsl:apply-templates select="following-sibling::*[1][self::l]" mode="nested-list"/></xsl:if></xsl:template>
Template
li[ancestor::frm:body][not(ancestor::footnote or ancestor::note)]
Namespace
No namespace
Match
li[ancestor::frm:body][not(ancestor::footnote or ancestor::note)]
Mode
#default
Import precedence
0
Priority
25
Source
<xsl:template match="li[ancestor::frm:body][not(ancestor::footnote or ancestor::note)]" priority="25"><!-- Original Target XPath: listitem --><form:listitem><xsl:apply-templates select="@*"/><xsl:apply-templates select="lilabel/refpt"/><xsl:apply-templates select="lilabel"/><form:bodytext><xsl:apply-templates select="* except lilabel"/><xsl:if test="following-sibling::*[1][self::l]"><xsl:apply-templates select="following-sibling::*[1][self::l]" mode="nested-list"/></xsl:if></form:bodytext></form:listitem></xsl:template>
When l has 2 or more consecutiveglp:note children, they should be mapped to a single note child of
list. The content of each glp:note should be placed inside
note/bodytext.
Source XML 4 - Multiple Consecutive glp:note Children of l
<l>
...
<li>
<lilabel>•</lilabel>
<p>
<text>Estoppel – if the true owner induces another to believe in a state of affairs and causes that other person to act on that
belief to his or her detriment, the true owner will not be allowed to deny that the state of affairs exists. In the context of sale of
goods, this means that if the true owner knowingly allows a seller to represent to a buyer that the seller has title to the goods and
the buyer, believing the representation, purchases the goods from the seller, the buyer will get title to the goods as against the
true owner. If the true owner owes the buyer a duty of care to the buyer to make the true owner’s title to the goods known or
apparent to the buyer, but breaches that duty and the buyer purchases the goods from a seller who in fact has no title, the true owner
might be estopped by negligence from asserting that ownership. Proving the existence of the duty is usually very difficult.</text>
</p>
</li>
<glp:note notetype="xref">
<p nl="0">
<text><emph typestyle="it">Big Rock Pty Ltd v Esanda Finance Corp Ltd </emph>10 WAR 259</text>
</p>
</glp:note>
<glp:note notetype="xref">
<p nl="0">
<text><emph typestyle="it">Thomas Australia Wholesale Vehicle Trading Co Pty Ltd v Marac Finance Australia Ltd </emph>(1985) 3 NSWLR
452</text>
</p>
</glp:note>
</l>
Target XML 4
<list>
...
<listitem>
<label>•</label>
<bodytext>
<p>
<text>Estoppel – if the true owner induces another to believe in a state of affairs and causes that
other person to act on that belief to his or her detriment, the true owner will not be allowed to deny
that the state of affairs exists. In the context of sale of goods, this means that if the true owner
knowingly allows a seller to represent to a buyer that the seller has title to the goods and the buyer,
believing the representation, purchases the goods from the seller, the buyer will get title to the goods
as against the true owner. If the true owner owes the buyer a duty of care to the buyer to make the true
owner’s title to the goods known or apparent to the buyer, but breaches that duty and the buyer
purchases the goods from a seller who in fact has no title, the true owner might be estopped by negligence
from asserting that ownership. Proving the existence of the duty is usually very difficult.</text>
</p>
</bodytext>
</listitem>
<note notetype="xref">
<bodytext>
<p>
<text><emph typestyle="it">Big Rock Pty Ltd v Esanda Finance Corp Ltd </emph>10 WAR 259</text>
</p>
<p>
<text><emph typestyle="it">Thomas Australia Wholesale Vehicle Trading Co Pty Ltd v Marac Finance Australia Ltd
</emph>(1985) 3 NSWLR 452</text>
</p>
</bodytext>
</note>
</list>
Template
l[@virtual-nesting='1'][$streamID='CA01' or $streamID='CA02CC' or $streamID='CA12'
or $streamID='CA19' or $streamID='CA14' or $streamID='CA15' or $streamID='CA04' ]
Documentation
Description
When l has attribute @virtual-nesting then
it should be converted to real list nesting (mean's creating some parent nested list
on
basis of attribute value i.e. "@virtual-nesting='3'"). Drop @virtual-nesting and add n-1 list wrappers, where n is the value of @virtual-nesting. Please refer the below input and target markups for more clarification:
Sudhanshu Srivastava : Added CA02CC for listing conversion
Namespace
No namespace
Match
l[@virtual-nesting='1'][$streamID='CA01' or $streamID='CA02CC' or $streamID='CA12'
or $streamID='CA19' or $streamID='CA14' or $streamID='CA15' or $streamID='CA04' ]
<xsl:template match="l[@virtual-nesting='1'][$streamID='CA01' or $streamID='CA02CC' or $streamID='CA12' or $streamID='CA19' or $streamID='CA14' or $streamID='CA15' or $streamID='CA04' ]" priority="2"><xsl:call-template name="virtualNesting"><xsl:with-param name="content" select="li"/><xsl:with-param name="counter" select="number(@virtual-nesting)"/></xsl:call-template></xsl:template>
Template
l[@virtual-nesting]
Documentation
Description
Assumes @virtual-nesting is always a digit and never less than 2
<xsl:template match="l[@virtual-nesting]"><xsl:choose><xsl:when test="$streamID='CA01' and(starts-with(ancestor::case:decisionsummary/child::heading/title,'Court Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Court Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Résumé de la Cour :') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Commission Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Board Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Tribunal Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Executive Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Commissioner Summary:') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Résumé du tribunal :') or starts-with(ancestor::case:decisionsummary/child::heading/title,'Sommaire du tribunal :') or contains(ancestor::case:decisionsummary/child::heading/title,'Subsequent History') or contains(ancestor::case:decisionsummary/child::heading/title,'Historique subséquent') or contains(ancestor::case:decisionsummary/child::heading/title,'Court Catchwords') or contains(ancestor::case:decisionsummary/child::heading/title,'Indexation de la Cour') or contains(ancestor::case:decisionsummary/child::p[1]/text[1]/emph[1],'Subsequent History') or contains(ancestor::case:decisionsummary/child::p[1]/text[1]/emph[1],'Historique subséquent') or contains(ancestor::case:decisionsummary/child::p[1]/text[1]/emph[1],'Court Catchwords') or contains(ancestor::case:decisionsummary/child::p[1]/text[1]/emph[1],'Indexation de la Cour'))"><p><list><listitem><bodytext><p><xsl:call-template name="virtualNesting"><xsl:with-param name="content" select="li"/><xsl:with-param name="counter" select="number(@virtual-nesting)"/></xsl:call-template></p></bodytext></listitem></list></p></xsl:when><xsl:otherwise><list><listitem><bodytext><p><xsl:call-template name="virtualNesting"><xsl:with-param name="content" select="li"/><xsl:with-param name="counter" select="number(@virtual-nesting)"/></xsl:call-template></p></bodytext></listitem></list></xsl:otherwise></xsl:choose><!-- Original Target XPath: list --></xsl:template>
Note: For GPL IN Content Stream
leg:comntry/@searchtype becomes
annot:annotation-grp/@grptype="COMMENTARY"
refptbecomesref:anchor and must be the first child in the sequence. Refer
to the refpt section for
more information.
heading/edpnumbecomesheading/desig
heading/titlebecomesheading/title
Note: In the input Xpath, leg:comntry is allowed within
leg:bodytext, but the target New Lexis Xpath allows
annot:annotations to be a sibling to
primlaw:bodytext and child element of
primlaw:level i.e.
leg:bodytext/leg:comntry becomes
annot:annotations/annot:annotation-grp.
The conversion of level is determined by the value of
@leveltype which also reflects the nesting structure.
Note: Maintain source nesting.
If source document is having empty elements (i.e.
bodytext/p/text and hrule) within
leg:comntry then removed the empty markups from
leg:comntry and leg:comntry should be
mapped with annot:annotations. Please refer the below markups for
understanding this scenario:
<xsl:template match="leg:comntry" name="leg-comntry-generic"><annot:annotations><!-- based on the examples for comm.intro and group children, outputting the annotation group only in certain conditions
but what are they? --><xsl:choose><xsl:when test="child::*[not(self::level[@leveltype=('comm.intro' , 'group')])]"><annot:annotation-grp><xsl:choose><!-- 20170601: MCJ: Added 'AU06' to list. --><xsl:when test="$streamID = ('AU04', 'AU05', 'AU06', 'AU08', 'NZ05','NZ06' , 'NZ12', 'NZ10', 'AU18')"><xsl:apply-templates select="@*"/><xsl:if test="heading/@searchtype[.='COMMENTARY'] or level/heading[@searchtype='COMMENTARY'] or (starts-with($streamID, 'IN') and @searchtype[.='COMMENTARY'])"><xsl:attribute name="grptype" select="'COMMENTARY'"/></xsl:if><xsl:apply-templates select="refpt | heading//refpt | bodytext/refpt"/><xsl:apply-templates select="heading"/><!-- JD: 2017-08-07: Adding for-each here to preserve ordering (don't just test that there is any child named bodytext, loop through each child and test self::); don't include levelinfo only having currency-statement (maps to doc:docinfo/currencystatement) --><xsl:for-each select="* except (refpt,heading,levelinfo[docinfo:currencystatement and count(*)=1])"><xsl:choose><xsl:when test="self::bodytext"><!-- 20170728: MCJ:
An annotation wrapper should only be created if the bodytext transformation has results. There are other instructions that suppress paragraphs and other
constructs when they are effectively empty (whitespace, tabs, etc.). We attempted to do this by applying the regex of '[\t\s\p{Z}]+' to the string value
of the bodytext child (not an exact comparison of what apply-templates against the bodytext) but a possible encoding problem is causing the character count
to always be off. As an alternative, the results of transforming bodytext are stored in a variable which is then evaluated. For future reference, the
regex that was originally attempted is here within the comment.
<xsl:variable name="bodytextString"><xsl:value-of select="bodytext" /></xsl:variable>
<xsl:variable name="replacedBodytextString" select="replace($bodytextString, '[\t\s\p{Z}]+', '')" />
--><xsl:variable name="bodytextResult"><xsl:apply-templates select="."/><!-- JD: 2017-08-07: changed from 'bodytext' to '.' since for-each loop has changed context node --></xsl:variable><!-- MCJ: Test both the result as a string and also that it doesn't have child nodes... both suggest that the transform of bodytext has a result that should be
wrapped in an annotation. Without this test, empty occurrences of annot:annotation are created. --><xsl:if test="normalize-space($bodytextResult) != '' or $bodytextResult/*"><annot:annotation><xsl:apply-templates select="."/></annot:annotation></xsl:if><!-- JD: 2017-08-07: removing this; after for-each causing duplicates --><!--<xsl:apply-templates select="node() except (refpt | heading | bodytext)"/>--></xsl:when><!-- JD: 2017-08-08: when self is create <annot:annotation-grp> --><xsl:when test="self::level[@leveltype=('comm.intro' , 'group')]"><xsl:apply-templates select="."/></xsl:when><!-- <xsl:when test="bodytext[string-length(replace(., '[\t\s\p{Z}]+', '')) != 0]">
<xsl:variable name="bodytextString">
<xsl:value-of select="bodytext" />
</xsl:variable>
<blah>Text of bodytext is :<xsl:value-of select="replace($bodytextString, '[\t\s\p{Z}]+', '')" />:</blah>
<annot:annotation>
<xsl:apply-templates select="bodytext" />
</annot:annotation>
<xsl:apply-templates select="node() except (refpt | heading | bodytext)"/>
</xsl:when> --><xsl:otherwise><annot:annotation><!--<xsl:apply-templates select="@* | node() except (levelinfo[docinfo:currencystatement and count(*)=1])"/>--><xsl:apply-templates select="@*"/><xsl:apply-templates select="refpt | heading//refpt | bodytext/refpt"/><!-- JL from bodytext template, we are outputting level/glp:note in bodytext except for UK15, UK06 and
other xpaths that don't apply here --><xsl:choose><xsl:when test="$streamID= ('UK15' , 'UK06')"><xsl:apply-templates select="node() except (refpt,levelinfo[docinfo:currencystatement and count(*)=1])"/></xsl:when><xsl:otherwise><xsl:apply-templates select="node() except (refpt,glp:note,levelinfo[docinfo:currencystatement and count(*)=1])"/></xsl:otherwise></xsl:choose></annot:annotation></xsl:otherwise></xsl:choose></xsl:for-each></xsl:when><xsl:otherwise><xsl:apply-templates select="@*"/><xsl:if test="heading/@searchtype[.='COMMENTARY'] or level/heading[@searchtype='COMMENTARY'] or (starts-with($streamID, 'IN') and @searchtype[.='COMMENTARY'])"><xsl:attribute name="grptype" select="'COMMENTARY'"/></xsl:if><xsl:apply-templates select="refpt | heading//refpt | bodytext/refpt"/><xsl:apply-templates select="node() except refpt"/></xsl:otherwise></xsl:choose></annot:annotation-grp></xsl:when><xsl:otherwise><xsl:apply-templates select="node() except refpt"/></xsl:otherwise></xsl:choose></annot:annotations></xsl:template>
JL to handle nested leg:comntry in all sorts of ridiculousness found as far as I know only in HK01.
This is really kludgy, there is no way around kludgy with this stuff. We do simliar things for legfragments
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_leg.comntry-level_LEVELTYPE_COMM.INTRO-LxAdv-annot.annotations-annot.annotation-grp.dita
****************************************************************************************************
This file is so completely identical except in attribute value of the matching "level" element, that
the functionality has been moved to
/XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_leg.comntry-level_LEVELTYPE_GROUP-LxAdv-annot.annotations-annot.annotation-grp.xsl
THIS MODULE IS INACTIVE.
- JL
****************************************************************************************************
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_leg.comntry-level_LEVELTYPE_GROUP-LxAdv-annot.annotations-annot.annotation-grp.dita
this is entirely identical to the comm.intro module and therefore the comm.intro module is handled here
<xsl:template match="level[ancestor::leg:comntry][@leveltype=('group' , 'comm.intro')]"><!-- Original Target XPath: annot:annotations/annot:annotation-grp/annot:annotation-grp --><annot:annotation-grp><xsl:if test="heading[@searchtype='COMMENTARY'] or heading[contains(title, '[Commentary]')]"><xsl:attribute name="grptype" select="'COMMENTARY'"/></xsl:if><xsl:apply-templates select="@*"/><xsl:apply-templates select="refpt | heading//refpt | bodytext/refpt"/><!-- JD: 2017-08-08: added NZ06 here and to exclusion list below in order to match DT output (output header within <annot:annotation-grp> per instruction in DITA above, rather than within <annot:annotation>). --><xsl:apply-templates select="heading[$streamID=('AU08','AU04','NZ06' , 'NZ12', 'AU18')]"/><!-- paul: see AU08 PS2017050300592679148LNIAUCOURTRULES_input_crimproc10061174.xml where heading is in group not in annotation --><xsl:if test="*[not(self::levelinfo[source_docinfo:currencystatement] or self::level or self::refpt or self::glp:note or self::heading[$streamID=('AU04', 'AU08' , 'NZ12', 'AU18')])]"><annot:annotation><xsl:choose><xsl:when test="heading[preceding-sibling::glp:note]"><xsl:apply-templates select="node() except (refpt | glp:note | heading[$streamID=('AU08', 'AU04','NZ06' , 'NZ12')])"/></xsl:when><xsl:otherwise><xsl:apply-templates select="node() except (level |refpt | heading[$streamID=('AU08', 'AU04','NZ06' , 'NZ12', 'AU18')])"/></xsl:otherwise></xsl:choose></annot:annotation></xsl:if><xsl:apply-templates select="level"/></annot:annotation-grp></xsl:template>
Template
level[ancestor::leg:comntry]/@leveltype
Documentation
Description
note: we need to do something about refpt moving holistically. Where are the target, valid places?
suppress the output of leg:comntry descendant level/@leveltype or else it gets copied. This should cover all leveltypes
refptbecomesref:anchor and must be the first child in the sequence.
Refer to the refpt
section for more information.
heading/edpnumbecomesheading/desig
heading/titlebecomesheading/title
bodytextbecomesbodytext
Example: Source XML
<leg:comntry subdoc="true" toc-caption="COMMENTARY ON REGULATION 12">
<heading searchtype="COMMENTARY">
<title><refpt id="CLWA.SL.SARW03.REG12.COM1" type="ext"/>COMMENTARY ON REGULATION 12</title>
</heading>
<level id="CLWA_SL.SGM_CLWA.SL.SARR12-1" leveltype="para0" subdoc="true" toc-caption="[SAR r 12.1] Cross references">
<heading searchtype="COMMENTARY">
<edpnum><refpt id="CLWA.SL.SARR12-1" type="ext"/>[SAR r 12.1] </edpnum>
<title>Cross references</title>
</heading>
<bodytext searchtype="COMMENTARY">
<p><text>See Halsbury's Laws of Australia Criminal Law [335–40] for details on the
powers and duties of prison officers, including the search of prisoners, in other jurisdictions.</text></p>
</bodytext>
</level>
</leg:comntry>
Example: Target XML
<annot:annotations>
<annot:annotation-grp grptype="COMMENTARY" includeintoc="true" alternatetoccaption="COMMENTARY ON REGULATION 12">
<ref:anchor id="CLWA.SL.SARW03.REG12.COM1" anchortype="global"/>
<heading><title>COMMENTARY ON REGULATION 12</title></heading>
<annot:annotation xml:id="CLWA_SL.SGM_CLWA.SL.SARR12-1" alternatetoccaption="[SAR r 12.1] Cross references"
includeintoc="true">
<ref:anchor id="CLWA.SL.SARR12-1" anchortype="global"/>
<heading>
<desig>[SAR r 12.1]</desig>
<title>Cross references</title>
</heading>
<bodytext>
<p><text>See Halsbury's Laws of Australia Criminal Law [335–40] for details
on the powers and duties of prison officers, including the search of prisoners, in
other jurisdictions.</text></p>
</bodytext>
</annot:annotation>
</annot:annotation-grp>
</annot:annotations>
Description
JL I guess the instructions means this?
JL 20171012 removed because it is ambiguous with same-output template for leg:comntry
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_leg.comntry-level_LEVELTYPE_PARA0-LxAdv-annot.annotations-annot.annotation-grp.dita
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_leg.comntry-level_LEVELTYPE_SUBPARA0-LxAdv-annot.annotations-annot.annotation-grp.dita
<xsl:template match="level[@leveltype='subpara0'][ancestor::leg:comntry]"><annot:annotationlevel><xsl:apply-templates select="@*"/><xsl:apply-templates select="refpt | heading/descendant::refpt | bodytext/refpt"/><xsl:apply-templates select="heading"/><xsl:if test="child::*[not(self::refpt or self::heading)]"><annot:bodytext><xsl:apply-templates select="node() except (heading | refpt)"/></annot:bodytext></xsl:if><!-- JL: annot:bodytext is requires so do this if there is no content at all. --><xsl:if test="not(child::*[not(self::refpt or self::heading)])"><annot:bodytext><p/></annot:bodytext></xsl:if></annot:annotationlevel><!--<annot:annotationlevel>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="refpt | heading/descendant::refpt | bodytext/refpt"/>
<xsl:apply-templates select="node() except (refpt | level)"/>
<xsl:if test="not(bodytext) and level">
<annot:bodytext>
<xsl:apply-templates select="node() except (heading)"/>
</annot:bodytext>
</xsl:if>
</annot:annotationlevel>--></xsl:template>
legfragment becomes primlaw:excerpt.
blockquote/legfragment/leg:level: When legfragment is the first child of
blockquote, drop the blockquote and convert the legfragment to primlaw:excerpt. If
the
Xpath is blockquote/legfragment/leg:level, then drop the blockquote and convert to
primlaw:excerpt/primlaw:level.
<leg:level id="NSW_ACT_2009-100_SCH1AMCL12"><leg:level-vrnt leveltype="clause" searchtype="LEGISLATION" subdoc="true" toc-caption="[12] Section 97CB Annual greenhouse gas benchmark statements">....
<leg:levelbody>
<leg:bodytext>
<p>
<text>Omit section 97CB (1). Insert instead:</text>
</p>
<blockquote>
<legfragment>
<leg:level>
<leg:level-vrnt leveltype="subclause">
<leg:heading
inline="true">
<desig><designum>(1)</designum></desig>
</leg:heading>
<leg:levelbody>
<leg:bodytext>
<p>
<text>A benchmark participant must lodge with the Tribunal a greenhouse gas benchmark statement:</text>
<l type="def">
<li><lilabel>(a)</lilabel>
<p>
<text>in respect of a compliance period (other than the final compliance period), not later than 1 March in the year immediately
following the end of that compliance period, or</text>
</p>
</li>
<li><lilabel>(b)</lilabel>
<p>
<text>in respect of the final compliance period, not later than 3 months after the termination day.</text>
</p>
</li>
</l>
Becomes
<primlaw:level xml:id="NSW_ACT_2009-100_SCH1AMCL12" leveltype="clause" subdoc="true" toc-caption="[12] Section 97CB Annual
greenhouse gas benchmark statements">.....
<primlaw:bodytext>
<p>
<text>Omit section 97CB (1). Insert instead:</text>
</p>
<primlaw:excerpt>
<primlaw:level leveltype="subclause">
<heading inline="true"><desig>(1)</desig></heading><primlaw:bodytext>
<p>
<text>A benchmark participant must lodge with the Tribunal a greenhouse gas benchmark statement:</text>
<list>
<listitem>
<label>(a)</label>
<bodytext>
<p>
<text>in respect of a compliance period (other than the final compliance period), not later than 1 March in the
year immediately following the end of that compliance period, or
</text>
</p>
</bodytext>
</listitem>
<listitem>
<label>(b)</label>
<bodytext>
<p>
<text>in respect of the final compliance period, not later than 3 months after the termination
day.
</text>
</p>
</bodytext>
</listitem>
</list>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_blockquote-legfragment-leg.level-LxAdv-primlaw.excerpt-primlaw.level.dita
JL separated out the templates because I need to convert legfragment without leg:level in it for other modules
blockquote passthrough is effected in the blockquote module
Namespace
No namespace
Match
legfragment//leg:level
Mode
#default
Import precedence
0
Priority
25
Source
<xsl:template match="legfragment//leg:level" priority="25"><!-- Original Target XPath: primlaw:excerpt/primlaw:level --><primlaw:level><xsl:if test="not(leg:level-vrnt/@leveltype)"><xsl:attribute name="leveltype">unclassified</xsl:attribute></xsl:if><xsl:apply-templates select="leg:level-vrnt/@*"/><!-- 2017-09-25 - MDS removed 'leg:level-vrnt/leg:heading/desig/designum/refpt' from A-T to stop duplication due to handling of leg:level-vrnt in
/modules/leg/leg.level-LxAdv-primlaw.level.xsl--><xsl:apply-templates select="leg:heading/desig/designum/refpt"/><xsl:apply-templates select="@* | node()"/></primlaw:level></xsl:template>
Template
legfragment
Documentation
Description
I assume we want to output excerpt level children without running them through bodytext first JL
Namespace
No namespace
Match
legfragment
Mode
#default
Import precedence
0
Source
<xsl:template match="legfragment"><!-- Original Target XPath: primlaw:excerpt --><primlaw:excerpt><xsl:apply-templates select="@*"/><xsl:for-each-group select="*" group-adjacent="if (self::leg:level) then 0 else 1"><xsl:choose><xsl:when test="current-grouping-key()=0"><xsl:apply-templates select="current-group()"/></xsl:when><xsl:otherwise><primlaw:bodytext><xsl:apply-templates select="current-group()"/></primlaw:bodytext></xsl:otherwise></xsl:choose></xsl:for-each-group></primlaw:excerpt></xsl:template>
Template
legfragment[child::*[1][self::p or self::l or self::table or self::leg:level or self::deflist]]
Documentation
Description
blockquote/legfragment/p: If the first child of legfragment
is a paragraph, list, or table, then omit blockquote and convert
legfragment to
primlaw:excerpt/primlaw:bodytext.
Note: In all cases,
primlaw:excerpt comes as a sibling of p
under bodytext because p doesn't allow
primlaw:excerpt.
Note: For more information regarding legfragment within
blockquote, please see the instructions for blockquote.
<footnote fntoken="ABCE.LEG.EAN95.S47.FTN1"
fnrtokens="ABCE.LEG.EAN95.S47.FTN1-R" type="default">
<fnlabel>*</fnlabel> <fnbody> <h>Commonwealth
variations</h> <p><refpt type="ext" id="ABCE.LEG.EAN95.S47.FTN1"/>
<text>Section 47 of the Commonwealth Act concludes:</text>
<blockquote> <legfragment> <p> <text>“Note: Section
182 gives this section a wider application in relation to Commonwealth records and
certain Commonwealth documents.”</text></p> </legfragment>
</blockquote> </p> </fnbody> </footnote>
Becomes
<footnote> <ref:anchor id="ABCE.LEG.EAN95.S47.FTN1"
anchortype="global"/> <label>*</label> <bodytext>
<h>Commonwealth variations</h> <p> <ref:anchor
id="ABCE.LEG.EAN95.S47.FTN1" anchortype="global"/> <text>Section 47 of the
Commonwealth Act concludes:</text> </p> <primlaw:excerpt>
<primlaw:bodytext> <p> <text>“Note: Section 182 gives this
section a wider application in relation to Commonwealth records and certain Commonwealth
documents.”</text> </p> </primlaw:bodytext>
</primlaw:excerpt> </bodytext> ... </footnote>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_blockquote-legfragment-p-LxAdv-primlaw.excerpt-primlaw.bodytext-p.dita
Namespace
No namespace
Match
legfragment[child::*[1][self::p or self::l or self::table or self::leg:level or self::deflist]]
<xsl:template match="legfragment[child::*[1][self::p or self::l or self::table or self::leg:level or self::deflist]]" priority="30"><xsl:choose><xsl:when test="$streamID = 'NZ03'"><blockquote><xsl:apply-templates select="@* | node()"/></blockquote></xsl:when><xsl:otherwise><!-- JD: 2017-07-25: Original contents here:
<primlaw:bodytext>
<xsl:apply-templates/>
</primlaw:bodytext>
but this had the side effect of wrapping all content in primlaw:bodytext; adding logic to output sibling <primlaw:level> when required.
JL 20171027: changed for-each-group select="node()" to select="*" because it was picking up on whitespace nodes
to output empty bodytext elements and legfragment has no PCDATA children in the dtd.
--><primlaw:excerpt><xsl:for-each-group select="*" group-adjacent="boolean(self::*:level)"><xsl:choose><!-- when current element is *:level (e.g., leg:level) A-T to produce primlaw:level --><xsl:when test="current-grouping-key()"><xsl:apply-templates select="current-group()"/></xsl:when><!-- otherwise create a <primlaw:bodytext> wrapper and process children --><xsl:otherwise><primlaw:bodytext><xsl:apply-templates select="current-group()"/></primlaw:bodytext></xsl:otherwise></xsl:choose></xsl:for-each-group></primlaw:excerpt></xsl:otherwise></xsl:choose></xsl:template>
Template
legfragment/glp:note
Documentation
Description
legfragment/glp:note: Handling of glp:note when it occurs within
legfragment:
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_legfragment-glp.note-LxAdv-primlaw.excerpt-primlaw.bodytext-note.dita
p/blockquote/legfragment: Handling of p/blockquote/legfragment:
<p>
<text>The meaning of sexual penetration for the purposes of subdivisions (8A) to (8G) of Div 1 of Pt 1 of the Crimes Act 1958 is defined in s 35(1) of the Crimes Act in the following terms:</text>
<blockquote>
<legfragment>
<deflist>
<defitem>
<defterm>
<emph typestyle="bf">sexual penetration</emph>
</defterm>
<defdesc>
<p>
<text>means</text>
</p>
...
</defdesc>
</defitem>
</deflist>
</legfragment>
</blockquote>
</p>
Becomes
<p>
<text>The meaning of sexual penetration for the purposes of subdivisions (8A) to (8G) of Div 1 of Pt 1 of the Crimes Act 1958 is defined in s 35(1) of the Crimes Act in the following terms:</text></p>
<primlaw:excerpt>
<primlaw:bodytext>
<deflist>
<defitem>
<defterm>
<emph typestyle="bf">sexual penetration</emph>
</defterm>
<defdesc>
<bodytext>
<p>
<text>means</text>
</p>
...
</bodytext>
</defdesc>
</defitem>
</deflist>
</primlaw:bodytext>
</primlaw:excerpt>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_p-blockquote-legfragment-LxAdv-primlaw.excerpt-primlaw.bodytext.dita
JL: passthru for blockquote/legfragment is in blockquote template. Here we just need to insert the wrappers
Template
link[not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp or parent::text[parent::docinfo:assoc-links
or parent::docinfo:assoc-links-grp])]generic-link
Documentation
Description
link becomes ref:lnlink[@service="ATTACHMENT"] and children can be converted as follows:
The attribute link/@status is always suppressed, it is never output to the target document.
link content becomes ref:marker.
Create ref:locator and describe as:
Create ref:locator-key and describe as:
Create ref:key-name with @name="attachment-key".
This line is hard coded.
Create ref:key-value with
@value, as follows:
If link[@smi] is present,
copy link[@filename] to
@value
If link[@smi] is not present,
then @value="X-Y-Z", where X
is LNI, Y is SMI, and Z is filename. LNI and SMI
(retreived from CSSM) values are added by
"Workflow Generic Image Handlers. The last
component "Z" is copied from
link[@filename].
If link[@smi] is not present,
then conversion program should pass
link[@filename] value to
“Workflow Generic Image Handler” as is and
“Workflow Generic Image Handler” will do conversion
of filename value as noted above. Conversion of
filename replaces underscore, blank, and period
with hyphen.
Create ref:locator-params and describe as:
ref:locator-params element contains locator parameters. It provides a parameter
(identified as a name/value pair) passing mechanism for link services. Each parameter
is expressed as a
@name and @value pair in proc:param
element. It is used to identify the attachment type and component sequence.
Create proc:param with @name and @value.
@name and @value are required attributes in
proc:param.
Three proc:param[@name] and proc:param[@value] pairs are described
below:
proc:param[@name="componentseq"] with the attribute
@value="1". This line is hard coded.
proc:param[@name="attachment-type"] with the
attribute @value. The @value value is from
link[@type]. Allowable values: “image”; “PDF”; “spreadsheet”; “audio”; “HTML”; “video”; “hotdoc”;
“wordprocess”.
proc:param[@name="attachment-smi"] with the
attribute @value. The @value
value is from link[@smi]. If
link[@smi] is not present, obtain SMI from CSSM.
This @value assignment is done by conversion program.
Source XML. Source @smi present
<link type="pdf" smi="98765" filename="xmpl-c1.pdf" status="valid">Download in PDF</link>
<link type="pdf" filename="pbap-c1.pdf" status="valid">Download in PDF</link>
Target XML. Source @smi not present
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">Download in PDF</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="X-Y-pbap-c1"/>
<!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value=""/>
<!-- @value populated with SMI obtained from CSSM -->
<!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
Exception: When link is used as intra-document linking within
ci:content.
If the ci:content contains a link child,
the link wrapper markup (not its content) shall be removed (omit
tag and retain content) and the link/@refpt value shall be moved
to lnci:cite/@citeref.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_link-LxAdv-ref.lnlink.dita
*****PLEASE READ*****
Image handling background note 2017-11-30:
Please use $streamID in Rosetta_link-LxAdv-ref.lnlink.xsl due to notation below.
It was originally intended that Apollo jurisdictions would use these (when first introduced in the DITA):
\svn\dataArch\XSLT\ContentArch\Rosetta-to-LA\modules\nonamespace\Rosetta_lnlink_service_ATTACHMENT-LxAdv-ref.lnlink.xsl
\svn\dataArch\XSLT\ContentArch\Rosetta-to-LA\modules\nonamespace\Rosetta_link-LxAdv-ref.lnlink.xsl
\svn\dataArch\XSLT\ContentArch\Rosetta-to-LA\modules\nonamespace\Rosetta_inlineobject-LxAdv-ref.inlineobject.xsl
And blobstore jurisdictions would use these (notice BLOBSTORE in the file name):
\svn\dataArch\XSLT\ContentArch\Rosetta-to-LA\modules\nonamespace\Rosetta_lnlink_service_ATTACHMENT-LxAdv-ref.lnlink_BLOBSTORE.xsl
\svn\dataArch\XSLT\ContentArch\Rosetta-to-LA\modules\nonamespace\Rosetta_link-LxAdv-ref.lnlink_BLOBSTORE.xsl
\svn\dataArch\XSLT\ContentArch\Rosetta-to-LA\modules\nonamespace\Rosetta_inlineobject-LxAdv-ref.inlineobject_BLOBSTORE.xsl
They were originally meant to be mutually exclusive.
Ditamap includes (and subsequently xsl drivers) may have included both blobstore and Apollo handling during the transition from one to the other even though only one image handling
is done in an LBU. Image handling is LBU wide and not individual stream specific.
Very importantly, there is a named template (@name="generic-link") in Rosetta_link-LxAdv-ref.lnlink.xsl which is called by both "Rosetta_p-LxAdv-p.xsl" and "Rosetta_bodytext-link-LxAdv-seclaw.bodytext-p-text-ref.lnlink.xsl". Both of these common modules are not LBU specific. .
This effectively, although unintentionally, crossed the original exclusivity described above.
Current fix is to use $streamID indicating HK and UK which are currently the only blobstore jurisdictions. Ultimately, goal is to re-establish these image handling files are mutually exclusive.
Namespace
No namespace
Match
link[not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp or parent::text[parent::docinfo:assoc-links
or parent::docinfo:assoc-links-grp])]
<xsl:template match="link[not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp or parent::text[parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp])]" name="generic-link"><xsl:choose><!-- Awantika:2017-11-07: updated for NZ12 for webstar #7039775 and #7076843 --><xsl:when test="$streamID='NZ12' and parent::pgrp or parent::li"><p><text><ref:lnlink service="ATTACHMENT"><ref:marker role="label"><xsl:apply-templates/></ref:marker><ref:locator><ref:locator-key><ref:key-name name="attachment-key"/><ref:key-value><xsl:attribute name="value"><xsl:choose><!-- JL: 20170526: Per Roopa and Selva, we should output the filename extension for image links to work --><xsl:when test="@smi"><xsl:value-of select="@filename"/></xsl:when><xsl:otherwise><xsl:value-of select="@filename"/></xsl:otherwise></xsl:choose></xsl:attribute></ref:key-value></ref:locator-key><ref:locator-params><proc:param name="componentseq" value="1"/><proc:param><xsl:attribute name="name">attachment-type</xsl:attribute><xsl:attribute name="value"><xsl:apply-templates select="@type"/></xsl:attribute></proc:param><proc:param><xsl:attribute name="name">attachment-smi</xsl:attribute><xsl:attribute name="value"><xsl:choose><xsl:when test="@smi"><xsl:value-of select="@smi"/></xsl:when><xsl:otherwise><xsl:value-of select="$smi"/></xsl:otherwise></xsl:choose></xsl:attribute></proc:param></ref:locator-params></ref:locator></ref:lnlink></text></p></xsl:when><xsl:otherwise><ref:lnlink service="ATTACHMENT"><ref:marker role="label"><xsl:apply-templates/></ref:marker><ref:locator><ref:locator-key><ref:key-name name="attachment-key"/><ref:key-value><xsl:attribute name="value"><xsl:choose><!-- JL: 20170526: Per Roopa and Selva, we should output the filename extension for image links to work --><xsl:when test="@smi"><xsl:value-of select="@filename"/></xsl:when><xsl:otherwise><xsl:value-of select="@filename"/></xsl:otherwise></xsl:choose></xsl:attribute></ref:key-value></ref:locator-key><ref:locator-params><!--SS - 2017-11-26: Added the below condition for added blobstore when link comes under 'paragraph' p.--><!-- JL: 2017-11-30: this module is supposed to be for Apollo but has been included in some blobstore LBUs (HK, UK).
Using streamID to make sure Blobstore information goes to Blobstore LBUs. --><xsl:choose><xsl:when test="contains(./@type, 'wordprocess') and (starts-with($streamID, 'HK') or starts-with($streamID , 'UK'))"><xsl:choose><xsl:when test="contains(./@type, 'wordprocess')"><proc:param name="attachment-type" value="wordprocess"/></xsl:when><xsl:otherwise><proc:param name="attachment-type" value="IMG"/></xsl:otherwise></xsl:choose><proc:param name="external-or-local" value="external"/><proc:param name="attachment-server" value="BlobStore"/><proc:param name="attachment-pguid" value="urn:contentItem:0000-0000-0000-0000-00000-00"/><proc:param name="componentseq" value="1"/></xsl:when><xsl:otherwise><!--SS: end here--><proc:param name="componentseq" value="1"/><proc:param><xsl:attribute name="name">attachment-type</xsl:attribute><xsl:attribute name="value"><xsl:apply-templates select="@type"/></xsl:attribute></proc:param><proc:param><xsl:attribute name="name">attachment-smi</xsl:attribute><xsl:attribute name="value"><xsl:choose><xsl:when test="@smi"><xsl:value-of select="@smi"/></xsl:when><xsl:otherwise><xsl:value-of select="$smi"/></xsl:otherwise></xsl:choose></xsl:attribute></proc:param></xsl:otherwise></xsl:choose></ref:locator-params></ref:locator></ref:lnlink></xsl:otherwise></xsl:choose></xsl:template>
Template
link/@status
Namespace
No namespace
Match
link/@status
Mode
#default
Import precedence
0
Source
<xsl:template match="link/@status"/>
Template
link/@smi
Namespace
No namespace
Match
link/@smi
Mode
#default
Import precedence
0
Source
<xsl:template match="link/@smi"/>
Template
link/@filename
Namespace
No namespace
Match
link/@filename
Mode
#default
Import precedence
0
Source
<xsl:template match="link/@filename"/>
Template
link/@type
Namespace
No namespace
Match
link/@type
Mode
#default
Import precedence
0
Source
<xsl:template match="link/@type"><xsl:choose><xsl:when test=".=('para','page', 'ed-pnum','refpt','logo')"><xsl:message>attachment-type is invalid, cannot be determined.</xsl:message></xsl:when><xsl:when test=".=('pdf' , 'pdf-fillable')">PDF</xsl:when><xsl:when test=".='hotdoc-nonfillable'">hotdoc</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose></xsl:template>
Template
link[parent::ci:content]
Documentation
Description
MDS - 2017-03-14 - Passes through children of link if parent is ci:content
This is taken from /Rosetta-to-LA/modules/nonamespace/Rosetta_ci.cite-LxAdv-lnci.cite.xsl documentation. Also copied to documentation in this module.
MDS - 2017-09-07 Unhandled in NZ07-DN Examples in CI show the @alttext dropped. There are no obviously matching structures in the ref:lnlink or ref:marker elements for LA.
Namespace
No namespace
Match
link/@alttext
Mode
#default
Import precedence
0
Source
<xsl:template match="link/@alttext"/>
Template
link[@refpt][not(@type or @smi or @filename)]
Documentation
Description
If link only has the attribute @refpt, then the following instructions should be used:
link becomes ref:lnlink.
The content of link becomes ref:marker.
Create ref:locator and populate the attribute ref:locator/@anchoridref with the
value of link/@refpt.
Note: ref:locator/@anchoridref that begins with a number must
have an underscore added at start. Also apply other identifier data type format as
used for xml:id and ref:anchor/@id
(e.g. change colon to underscore). Refer to the section titled "Identifiers to ID
Data Type -
Handling Pattern Restrictions", if that section exists in this CI.
Note:
If the link element source also includes a @dpsi, the attribute should be dropped.
Source XML: only attribute of link is refpt
<link refpt="x98-1174a2">page 324 line 46</link>
Target XML: only attribute of link is refpt
<ref:lnlink>
<ref:marker>page 324 line 46</ref:marker>
<ref:locator anchoridref="x98-1174a2"/>
</ref:lnlink>
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
If link element occurs as direct child of bodytext then conversion need to move
ref:lnlink as child of p/text, i.e, bodytext/link becomes
seclaw:bodytext/p/text/ref:lnlink.
Note: Please note that, in Commentary-Form-Precedents element bodytext maps to seclaw:bodytext,
form:bodytext and pubfm:narrative in different content models.
Source XML : if element link is direct child of bodytext
<bodytext searchtype="FORM">
<!-- ETC. -->
<link type="pdf" filename="adm120-1.pdf">Download in PDF</link>
<!-- ETC. -->
</bodytext>
Target XML : if element link is direct child of bodytext
<form:bodytext>
<!-- ETC. -->
<form:p>
<form:text>
<ref:lnlink service="ATTACHMENT">
<ref:marker role="label">Download in PDF</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="attachment-key"/>
<ref:key-value value="X-Y-adm120-1"/>
<!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="attachment-type" value="PDF"/>
<proc:param name="attachment-smi" value=""/>
<!-- @value populated with SMI obtained from CSSM -->
<!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:lnlink>
</form:text>
</form:p>
<!-- ETC. -->
</form:bodytext>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_bodytext-link-LxAdv-seclaw.bodytext-p-text-ref.lnlink.dita
JL don't need to worry about the target parent element name because it's already been transformed by other modules
copied link processing from link template although I'd rather call it.
Note: Elements that contain the attribute @ln.user-displayed="false"
are used for certain functionality in Rosetta that does not exist in Lexis Advance.
Each of
the following elements have mappings described elsewhere in this CI for when this
attribute
does not exist. The examples here are ONLY for when this
@ln.user-displayed="false" appears. (This attribute never has a
"true" value, i.e. @ln.user-displayed="true".)
When ln.user-displayed="false" appears on any date element (i.e.
case:decisiondate ln.user-displayed="false"), that element is
translated into the target but with the element content omitted. Only the attributes
are
populated. So there is no displayable content.
The attribute decision:decisiondate/@normdate should be populated
with the values of case:decisiondate/date/@year,
case:decisiondate/date/@month and
case:decisiondate/date/@day concatenated and separated by a single
hyphen. The values of case:decisiondate/date/@month and
case:decisiondate/date/@day should be padded with zeroes so that
they are 2 digits.
Note: If one or more of the three date values (year, month or day) are
absent, then decision:decisiondate/@normdate should not be
populated.
Source XML
<case:decisiondate ln.user-displayed="false">
<date year="1995" month="04" day="8">8 April 1995</date>
</case:decisiondate>
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If case:disposition has attribute @ln.user-displayed="false" then suppress it.
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If case:judges has attribute @ln.user-displayed="false": data has been fixed by LBU so it won't occur in updated data. In
meantime conversion can suppress it.
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If case:reportercite has attribute @ln.user-displayed="false" then map to citation as usual. Suppress the attribute
@ln.user-displayed.
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If edpnum has attribute @ln.user-displayed="false" then map to desig or
altdesig as usual but no element content carried forward. Only the attribute @value is populated.
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis Advance.
Each of the
following elements have mappings described elsewhere in this CI for when this attribute
does not exist. The examples here are ONLY for when this
@ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If heading has attribute @ln.user-displayed="false" the element is suppressed.
Template
leg:heading[@ln.user-displayed='false' and not(parent::leg:level-vrnt)]
Documentation
Description
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If leg:heading has attribute @ln.user-displayed="false" the element is suppressed.
leg:heading[@ln.user-displayed='false' and not(parent::leg:level-vrnt)]
Mode
#default
Import precedence
0
Source
<xsl:template match="leg:heading[@ln.user-displayed='false' and not(parent::leg:level-vrnt)]"/>
Template
leg:levelinfo[leg:levelstatus]
Documentation
Description
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If leg:juris has attribute @ln.user-displayed="false" then map it as usual (as if the
@ln.user-displayed did not exist).
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If leg:levelstatus has attribute @isrepealed="true" then map the @statuscode regardless of whether
@ln.user-displayed exists or not. If the attribute @ln.user-displayed exists, then don't create the
statustext element (but retain the @statuscode as stated here).
<xsl:template match="leg:levelstatus[@ln.user-displayed='false' and @isrepealed='true']">
<!-\- Original Target XPath: statustext -\->
<legisinfo:statusgroup>
<legisinfo:status>
<xsl:attribute name="statuscode" select="'repealed'"/>
</legisinfo:status>
</legisinfo:statusgroup>
</xsl:template>
MDS 2017-05-18 - Functionality in general module leg.levelstatus
<xsl:template match="leg:levelstatus[@ln.user-displayed='false' and not(@isrepealed='true')]"/>
xsl:template match="leg:levelinfo[* and not(*[not(self::leg:levelstatus)])]"
JD: 2017-08-01: rewriting rule; original rule intended to apply when the only child of
leg:levelinfo is leg:levelstatus, which omits that output when other elements are present
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If leg:officialname has attribute @ln.user-displayed="false" becomes
legisinfo:officialtitle with attribute source="editoriallyassigned"
Note: In order to enable searching and indexing while retaining the display integrity of
the information. The @source
attribute will be populated with "editoriallyassigned" indicating these fields were
assigned their value.
The viewspec will utilize the @source attribute to choose whether to display this
information
differently or not at all depending on the needs of the LBU users.
MCJ: Single template to handle leg:officialname. This collapses the specific instructions around @ln.user-displayed="false" with the
generic-case of no @ln.user-displayed and the lack of @ln.user-displayed.
Namespace
No namespace
Match
leg:officialname
Mode
#default
Import precedence
0
Source
<xsl:template match="leg:officialname"><!-- JL: ref:anchor is not valid in legisinfo:officialtitle --><xsl:choose><xsl:when test="parent::leg:info"><legisinfo:names><legisinfo:officialtitle><xsl:apply-templates select="@*"/><!-- MCJ: Only create the @source attribute of 'editoriallyassigned' if @ln.user-displayed="false". --><xsl:if test="@ln.user-displayed='false'"><xsl:attribute name="source">editoriallyassigned</xsl:attribute></xsl:if><xsl:apply-templates select="node() except refpt"/></legisinfo:officialtitle></legisinfo:names></xsl:when><xsl:otherwise><legisinfo:legisinfo><legisinfo:names><legisinfo:officialtitle><xsl:apply-templates select="@*"/><!-- MCJ: Only create the @source attribute of 'editoriallyassigned' if @ln.user-displayed="false". --><xsl:if test="@ln.user-displayed='false'"><xsl:attribute name="source">editoriallyassigned</xsl:attribute></xsl:if><xsl:apply-templates select="node() except refpt"/></legisinfo:officialtitle></legisinfo:names></legisinfo:legisinfo></xsl:otherwise></xsl:choose></xsl:template>
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
If leg:officialnum has attribute @ln.user-displayed="false" becomes primlawinfo:identifier with attribute source="editoriallyassigned"
Note: In order to enable searching and indexing while retaining the display integrity of
the information. The @source
attribute will be populated with "editoriallyassigned" indicating these fields were
assigned their value.
The viewspec will utilize the @source attribute to choose whether to display this
information
differently or not at all depending on the needs of the LBU users.
MCJ: Single template to handle leg:officialnum. This collapses the specific instructions around @ln.user-displayed="false" with the
generic-case of no @ln.user-displayed and the lack of @ln.user-displayed.
Namespace
No namespace
Match
leg:officialnum
Mode
#default
Import precedence
0
Source
<xsl:template match="leg:officialnum"><primlawinfo:identifier><xsl:apply-templates select="@*"/><xsl:attribute name="idtype" select="'officialnum'"/><!-- MCJ: Set @source='editoriallyassigned' if @ln.user-displayed is explicitly set to 'false'. --><xsl:if test="@ln.user-displayed='false'"><xsl:attribute name="source" select="'editoriallyassigned'"/></xsl:if><xsl:apply-templates select="node()"/></primlawinfo:identifier></xsl:template>
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
When leg:year has attribute @ln.user-displayed="false" (i.e. leg:year/@ln.user-displayed="false"),
that element is translated into the target but with the element content omitted. Only
the attributes are populated. So there is no displayable content.
JD: 2017-07-27: the instructions for this are ambiguous; I read it
as the <primlaw:enactdate> is used as an example of when only date attributes and not
content would be output, i.e., the target element for leg:year could be different
(as in NZ06, where the target is <primlawinfo:assentdate>).
If that reading is correct, then this template should just output attributes
<xsl:template match="leg:heading/@align"><!-- Original Target XPath: @align --><xsl:attribute name="align" select="."/></xsl:template>
Template
leg:heading/@inline
Namespace
No namespace
Match
leg:heading/@inline
Mode
#default
Import precedence
0
Source
<xsl:template match="leg:heading/@inline"><!-- Original Target XPath: @inline --><xsl:attribute name="inline" select="."/></xsl:template>
Template
refnum[@ln.user-displayed='false']
Documentation
Description
Note: Elements that contain the attribute @ln.user-displayed="false" are used for certain functionality in Rosetta that does not exist in Lexis
Advance. Each of the following elements have mappings described elsewhere in this
CI for when this attribute does not exist. The examples here are ONLY for when
this @ln.user-displayed="false" appears. (This attribute never has a "true" value, i.e. @ln.user-displayed="true".)
When refnum has attribute @ln.user-displayed="false" (i.e. refnum/@ln.user-displayed="false"),
that element is translated into the target but with the element content omitted. Only
the attributes are populated. So there is no displayable content.
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_refnum_ln.user-displayed.dita
Namespace
No namespace
Match
refnum[@ln.user-displayed='false']
Mode
#default
Import precedence
0
Source
<xsl:template match="refnum[@ln.user-displayed='false']"><!-- Original Target XPath: --><!-- Could not determine target element or attribute name: <> --><!-- Could not determine target element or attribute name: </> --><refnum><xsl:attribute name="refnumscheme">UCN</xsl:attribute><xsl:attribute name="num" select="node()"/></refnum></xsl:template>
Template
refnum/@ln.user-displayed
Namespace
No namespace
Match
refnum/@ln.user-displayed
Mode
#default
Import precedence
0
Source
<xsl:template match="refnum/@ln.user-displayed"/>
Template
lnlink[@service='SEARCH']
Documentation
Description
When lnlink[@service="SEARCH"] occurs it is suppressed. The service type "SEARCH" is not supported in New Lexis.
It is recommended that lnlink elements with @service="SEARCH" be copied as is into an XML comment. This retains the content for future analysis
without creating unsupported target markup. The risk of this approach is the non-conversion
of any marker/display text that is within the lnlink and the consequent lack of this text being displayed in NewLexis products.
Source XML showing service type "SEARCH" converted to XML comment.
lnlink[@service="ATTACHMENT"] becomes ref:lnlink[@service="ATTACHMENT"], and its child elements are transformed as follows:
The attribute lnlink/@status is always suppressed, it is never output to the target document.
lnlink/marker becomes ref:lnlink/ref:marker, with attribute marker/@role becoming ref:marker/@role if present
create ref:lnlink/ref:locator and populate as follows:
if and only if there is an
lnlink/api-params/param where
param/@name="attachment-key", then this
param becomes
ref:locator/ref:key-name/@name="attachment-key", then a
ref:key-value element is also created, and the attribute
param/@value becomes
ref:locator/ref:key-value/@value.
otherwise lnlink/api-params> becomes
ref:locator/ref:locator-params, and its child elements are
transformed as follows:
all other api-params/param elements (with the
exception ofparam/@name="attachment-key") become
ref:locator-params/proc:param, with attribute
param/@name becoming
proc:param/@name and attribute
param/@value becoming
proc:param/@value.
Template
lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)]
Documentation
Description
SNB: 2017-11-02 add LPA to the NZ11/AU10 fix; looks to me like the general template rule above
(xsl:template match="lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)])
is WRONG for all other streams because it doesnt create api-params, and the general template rule for api-params is wrong
because it results in 2 smi values, and this fix really should be for all streams, but I'd be afraid to do it :)
Namespace
No namespace
Match
lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)]
Template
lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)][$streamID=('NZ11','AU10','USLPA')]/api-params
Documentation
Description
SNB: 2017-11-02 add LPA to this fix; looks to me like the general template rule above
(xsl:template match="lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)])
is WRONG for all other streams because it doesnt create api-params, and the general template rule for api-params is wrong
because it results in 2 smi values, and this fix really should be for all streams, but I'd be afraid to do it :)
Namespace
No namespace
Match
lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)][$streamID=('NZ11','AU10','USLPA')]/api-params
<xsl:template match="lnlink[@service='ATTACHMENT'][not(parent::docinfo:assoc-links or parent::docinfo:assoc-links-grp)][$streamID=('NZ11','AU10','USLPA')]/api-params" priority="2"><ref:locator-params><xsl:for-each select="param[not(@name='attachment-key')]"><proc:param name="{@name}" value="{@value}"/></xsl:for-each></ref:locator-params></xsl:template>
Template
lnlink[@service='ATTACHMENT']/api-params
Namespace
No namespace
Match
lnlink[@service='ATTACHMENT']/api-params
Mode
#default
Import precedence
0
Source
<xsl:template match="lnlink[@service='ATTACHMENT']/api-params"><ref:locator-params><xsl:apply-templates/><xsl:if test="parent::lnlink[@service='ATTACHMENT']"><proc:param><xsl:attribute name="name">attachment-smi</xsl:attribute><xsl:attribute name="value"/><xsl:message>need SMI from CSSM? Is this a parameter?</xsl:message></proc:param></xsl:if></ref:locator-params></xsl:template>
marker is suppressed if it contains inlineobject as a child element.
Source XML
<lnlink status="valid" service="SEARCH" scope="All Subscribed Australian Cases and Commentary" scope-protocol="combined-source-name">
<marker>
<inlineobject width="21px" type="image" filename="mb.gif" attachment="web-server" alttext="click to find cases & commentary"/>
</marker>
<api-params>
<param name="expressSearch" value="true"/>
<param name="searchString" value="SUPREME COURT RULES 1970"/>
</api-params>
</lnlink>
Suppress marker. A corresponding product requirement should be created with an instruction to instantiate
the image on retrieval based on information/semantic markup in the document.
Note: nl comes with @n then
@n will be suppressed in NL conversion.
Note: MLV: NSW Law reports - preserve spacing and linebreaks for licensing.
Source XML
<tbody>
<row>
<entry colname="c1" align="left">On the day after this Regulation's notification
day.<nl/>(4/11/2008)</entry>
</row>
</tbody>
Target XML
<tbody>
<row>
<entry colname="c1" align="left">On the day after this Regulation's notification
day.<proc:nl/>(4/11/2008)</entry>
</row>
</tbody>
Source XML
<p>
<text>
<nl n="2"/>
</text>
</p>
Target XML
<p>
<text>
<proc:nl/>
</text>
</p>
Description
JL This is what I envision in the future:
<xsl:template match="marker[inlineobject]" priority="25">
<xsl:apply-templates select="inlineobject" mode="to-be-determined"/>
</xsl:template>
Awantika:2017-11-30- CI has differnt rule for CA02CC,DC and DS."Any nl elements that occur inside case:casename should be suppressed if they are preceded or followed by a space. Any nl elements that
are not preceded or followed by a space should be converted into a single space character. Webstar# 6994049"
<xsl:template match="nl"><xsl:choose><!-- Awantika: Commenting this for CA02CC.Webstar 6994049. CI doesn't say to create proc:nl
"Any nl elements that occur inside case:casename should be suppressed if they are preceded or followed by a space. Any nl elements that
are not preceded or followed by a space should be converted into a single space character."
--><xsl:when test="$streamID='CA02CC' and parent::case:casename"><xsl:apply-templates/></xsl:when><xsl:when test="$streamID='AU21'"><xsl:choose><xsl:when test="parent::text/parent::p/parent::source_dict:subtopic/@id[starts-with(.,'BOOK:')]"/><xsl:otherwise><xsl:element name="proc:nl"><xsl:apply-templates/></xsl:element></xsl:otherwise></xsl:choose></xsl:when><xsl:otherwise><xsl:element name="proc:nl"><xsl:apply-templates/></xsl:element></xsl:otherwise></xsl:choose></xsl:template>
Template
frac[parent::num or ancestor::formula or ancestor::dispformula or parent::fracor or
parent::frac]
Documentation
Description
frac becomes frac. The output
frac must be within a num or
formula ancestor element (one of these does not have to be an
immediate parent, just an ancestor). If the output frac does not have
such an ancestor, then a parent num element must be created to
contain the frac.
Within frac the child numer becomes numer
and the child denom becomes denom. Both numer
and denom are required children of frac.
Source XML where frac occurs outside of num (has no ancestor that is num)
<p><text>Given the ratio
<frac>
<numer>3</numer>
<denom>7</denom>
</frac> then the ...</text></p>
Target XML
<p><text>Given the ratio
<num>
<frac>
<numer>3</numer>
<denom>7</denom>
</frac>
</num> then the ...</text></p>
Source XML where emph occurs as parent of frac and the frac itself contains a nested frac.
<title>...<emph>
<!-- This is the outer <frac>. -->
<frac>
<numer>
<!-- This is a nested <frac>. -->
<frac>
<numer>3</numer>
<denom>8</denom>
</frac>
</numer>
<denom>7</denom>
</frac>
</emph>...</title>
Target XML
<emph>
<!--
This <num> is created to contain the outer <frac>,
since otherwise this <frac> would have no ancestor that is <num>.
-->
<num>
<frac>
<numer>
<!--
Note the nested <frac> is not wrapped in another <num>,
since it already has an ancestor that is <num>.
-->
<frac>
<numer>3</numer>
<denom>8</denom>
</frac>
</numer>
<denom>7</denom>
</frac>
</num>
</emph>
2017-10-04 - MDS: added 'or parent:fracor' to match modified monolith.
2017-10-06 - JL: added 'or parent:frac' to match modified monolith for HK01.
Namespace
No namespace
Match
frac[parent::num or ancestor::formula or ancestor::dispformula or parent::fracor or
parent::frac]
Mode
#default
Import precedence
0
Source
<xsl:template match="frac[parent::num or ancestor::formula or ancestor::dispformula or parent::fracor or parent::frac]"><!-- Original Target XPath: num/frac --><frac><xsl:apply-templates select="@* | node()"/></frac></xsl:template>
Template
frac[not(parent::num or ancestor::formula or ancestor::dispformula or parent::frac)]
Namespace
No namespace
Match
frac[not(parent::num or ancestor::formula or ancestor::dispformula or parent::frac)]
Mode
#default
Import precedence
0
Source
<xsl:template match="frac[not(parent::num or ancestor::formula or ancestor::dispformula or parent::frac)]"><!-- Original Target XPath: num/frac --><num><frac><xsl:apply-templates select="@* | node()"/></frac></num></xsl:template>
Template
numer
Namespace
No namespace
Match
numer
Mode
#default
Import precedence
0
Source
<xsl:template match="numer"><!-- Original Target XPath: numer --><numer><xsl:apply-templates select="@* | node()"/></numer></xsl:template>
Template
denom
Namespace
No namespace
Match
denom
Mode
#default
Import precedence
0
Source
<xsl:template match="denom"><!-- Original Target XPath: denom --><denom><xsl:apply-templates select="@* | node()"/></denom></xsl:template>
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_org-to-LexisAdvance_entity_org.dita
BRT: the following template is in entity.xsl, match="org" in xsl:otherwise choice. I did not split this out in entity.xsl - left 'as is'
Except where otherwise noted, p becomes
p comes with @indent becomes
@indent. @indent has tokenized
value in NewLexis schema. And p/@style becomes
p/@align. @align has tokenized
value in NewLexis Schema.
Source XML
<blockquote> <p indent="hang"> <text>Note: There is no
penalty for this Rule.</text></p> </blockquote>
Target XML
<blockquote> <p indent="hang"> <text>Note: There is no
penalty for this Rule.</text> </p> </blockquote>
Note: If p comes with @i then
@i will get dropped in NewLexis.
Source XML
<blockquote> <p i="3.5" indent="hang"> <text>Note:
There is no penalty for this Rule.</text></p> </blockquote>
Target XML
<blockquote> <p indent="hang"> <text>Note: There is no
penalty for this Rule.</text> </p> </blockquote>
Note: If p comes with @nl this means the
p should start with the same number of
proc:nl elements before any text content in order to
maintain vertical white space.
<p style="right"> <text><emph typestyle="it">Last
updated: June 2011</emph></text> </p>
Target XML
<p align="right"> <text><emph typestyle="it">Last
updated: June 2011</emph></text> </p>
Exceptional scenario for NZ07-Linxplus
If p or p/@nl="0" is a child of
references element then merge all
p or p/@nl="0" in a single
p in target. Also all occurences of
nl within text becomes
proc:nl. Refer below example.
Note: If source document is having the input scenario
"pgrp/p/leg:histnote" then conversion needs to
drop 'p' markup in target conversion and target
mapping xpath is
"pgrp/note[@notetype="historical"]".
Note: For Stream 'HK06'
When the source has deflist/defitem/p/text then omit
p/text and retain defitem.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_p-LxAdv-p.dita
BRT: this template is the otherwise condition in match="p" in base.xsl.
The rules in this topic for handling @nl are different than the existing XSLT, which ignores and suppresses the element.
Adding template match="p[@nl!='']/text" to handle this rule. *** Also, did not address NZ07 exception scenario**
JL: seems like the @nl handling will not behave properly unless we move it to the text template.
I moved it to XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_text-LxAdv-text-with-test-for-whitespace-content.xsl
PLEASE LOOK THERE!!!!!! IF YOU NEED TO ADD IT TO ANOTHER MODULE FOR ELEMENT <text> WE MIGHT WANT TO FURTHER MODULARIZE IT
<xsl:template match="p"><xsl:variable name="docinfoidtext" select="/*/docinfo/docinfo:doc-id/text()"/><xsl:choose><!-- Priya Kaushal: Added below code for UK 15 --><xsl:when test="parent::references[$streamID = 'UK15']"><bodytext><p><xsl:apply-templates select="@* | node()"/></p></bodytext></xsl:when><xsl:when test="parent::in:body[$streamID = 'AU16']"><p><xsl:apply-templates select="node()"/></p></xsl:when><xsl:when test="parent::in:body"><bodytext><p><xsl:apply-templates select="node()"/></p></bodytext></xsl:when><!-- Vikas Rohilla : Included for the stream UK12 --><xsl:when test="parent::blockquote[$streamID = 'UK12']"><p><xsl:apply-templates select="@* | refpt, node() except refpt"/></p></xsl:when><xsl:when test="child::text/child::note[@notetype!='xref'][$streamID = 'UK12']"><xsl:apply-templates select="@* | refpt, node() except refpt"/></xsl:when><xsl:when test="(parent::frm:div | parent::frm:body | parent::clause[ancestor::frm:div | ancestor::frm:body] | parent::li[ancestor::frm:body and not(parent::l/parent::entry)])[not(ancestor::footnote or ancestor::note)] [$streamID = ('NZ11','AU10')]"><form:p><xsl:if test="not(@style) and child::text[1]/@align[.!='']"><xsl:copy-of select="child::text[1]/@align"/></xsl:if><xsl:apply-templates select="@* | refpt, node() except refpt"/></form:p></xsl:when><xsl:when test="(parent::frm:div | parent::frm:body | parent::clause[ancestor::frm:div | ancestor::frm:body] | parent::li[ancestor::frm:body])[not(ancestor::footnote or ancestor::note)][$streamID = 'UK12']"><form:p><xsl:if test="not(@style) and child::text[1]/@align[.!='']"><xsl:copy-of select="child::text[1]/@align"/></xsl:if><xsl:apply-templates select="@* | refpt, node() except refpt"/></form:p></xsl:when><xsl:when test="(parent::sigblock[ancestor::frm:div | ancestor::frm:body])[not(ancestor::footnote)][$streamID = 'UK12']"><form:line><xsl:apply-templates select="@* | node()"/></form:line></xsl:when><!-- MDS - occurs in HK04 - child is leg:histnote then the p element is not output and simply passed through.--><!-- JL revised to handle the many scenarios when p has other children than leg:histnote
also revised to strip the p wrapper in certain conditions when legfragment is a child
--><xsl:when test="leg:histnote | blockquote[legfragment and not(child::*[2])][parent::p[parent::*:bodytext or parent::pgrp or parent::li or parent::fnbody or parent::glp:note or parent::case:judgmentbody or parent::case:appendix]]"><!--<xsl:apply-templates select="node()"/>--><xsl:for-each-group select="*" group-adjacent=" if (self::leg:histnote or self::blockquote[legfragment and not(child::*[2])][parent::p[parent::*:bodytext or parent::pgrp or parent::li or parent::fnbody or parent::glp:note or parent::case:judgmentbody or parent::case:appendix]]) then 0 else 1"><xsl:choose><xsl:when test="current-grouping-key() = 0"><xsl:apply-templates select="current-group()"/></xsl:when><!--Satbir: Added below template for changing order of reft before desig in NZ03 only--><xsl:when test="$streamID = 'NZ03'"><p><xsl:apply-templates select="following-sibling::refpt[preceding-sibling::pnum]"/><xsl:for-each select="current-group()"><xsl:apply-templates select="current() except self::refpt"/></xsl:for-each></p></xsl:when><xsl:otherwise><p><xsl:apply-templates select="parent::p/@*"/><xsl:if test="not(parent::p/@style)"><xsl:copy-of select="parent::p/text[1]/@align"/></xsl:if><!-- MDS 2017-08-08 Added handling for refpt to reorder in output--><xsl:apply-templates select="current-group()[self::refpt]"/><xsl:for-each select="current-group()"><xsl:apply-templates select=". except(self::refpt)"/></xsl:for-each></p></xsl:otherwise></xsl:choose></xsl:for-each-group></xsl:when><!-- JL: funky NZ07 case where we collapse p or p[@nl='0'] element children of references
full logic isn't given but I assume we don't do the collapse if the reference has any non-p children or if
references has any p children where the @nl value is not zero or we're going to be here all year --><xsl:when test="parent::references[not(child::*[not(self::p[@nl = '0' or not(@nl)])])] and starts-with($streamID, 'NZ07') and (not(@nl) or @nl = '0') and not(preceding-sibling::p)"><xsl:element name="p" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><!-- JL this "if" condition that moves text align att value to the parent p is generic and cannot be used for CA --><xsl:apply-templates select="@*"/><xsl:if test="not(@style) and child::text[@align[. != '']] and not(child::text[2]) and not(starts-with($streamID, 'CA'))"><xsl:attribute name="align"><xsl:value-of select="text/@align"/></xsl:attribute></xsl:if><!-- JL: the sample seems to indicate they want to collapse some of the text child elements too,
but doesn't give the logic for doing that so I'm GUESSING based on the sample!
My guess at the logic used: if the @nl has the same value as (or is missing the same as) the previous p, then collapse
text element children too.
This needs to be very carefully tested when we test NZ07 data.
--><xsl:choose><xsl:when test="child::*[not(self::text)] or following-sibling::p[child::*[not(self::text)]]"><xsl:apply-templates select="refpt | following-sibling::p/refpt"/><xsl:apply-templates select="*[not(self::refpt)] | text()"/><!-- if any p elements have ANY child elements other than <text>, don't merge child text nodes. cleaner --><xsl:for-each select="following-sibling::p"><xsl:apply-templates select="*[not(self::refpt)] | text()"/></xsl:for-each></xsl:when><xsl:otherwise><!-- can assume p has only text children, yay! And we have also whittled the possibilities down to "p contains an nl att or not" --><xsl:for-each-group select="self::p | following-sibling::p" group-adjacent="exists(@nl)"><xsl:element name="text" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:apply-templates select="current-group()[1]/text[1]/@*"/><xsl:for-each select="current-group()"><xsl:apply-templates select="text/node()"/></xsl:for-each></xsl:element></xsl:for-each-group></xsl:otherwise></xsl:choose></xsl:element></xsl:when><!-- suppresses context nodes already accessed in previous condition --><xsl:when test="parent::references[not(child::*[not(self::p[@nl = '0' or not(@nl)])])] and starts-with($streamID, 'NZ07') and (not(@nl) or @nl = '0') and preceding-sibling::p"/><xsl:when test="starts-with($streamID, 'CA') and count(text) > 1 and not(@style) and text[@align]"><xsl:for-each-group select="*" group-adjacent="concat('', @align)"><xsl:element name="p" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:apply-templates select="parent::p/@*"/><xsl:copy-of select="@align"/><xsl:for-each select="current-group()"><xsl:apply-templates select="."/></xsl:for-each></xsl:element></xsl:for-each-group></xsl:when><!-- Awantika: conditional change for AU20, using double slashes as full path is not working here --><xsl:when test="//source_cttr:annotations/child::heading/note/h[. = 'ActName' or . = 'Act Name'] and $streamID = 'AU20'"><xsl:apply-templates/></xsl:when><xsl:when test="parent::bodytext[$streamID = 'CA12']"><p><xsl:if test="child::text/ci:cite[not(preceding::p/text/ci:cite)] and not(child::text/@searchtype='CASE-NAME')"><ref:anchor><xsl:attribute name="id">dict-CASENAME-CITE</xsl:attribute><xsl:attribute name="anchortype">local</xsl:attribute></ref:anchor></xsl:if><xsl:apply-templates select="node()"/></p></xsl:when><!-- 2017-10-17 - MDS: Added due to Webstar 7025682 --><xsl:when test="parent::l[$streamID='UK12']"><listitem><bodytext><p><xsl:apply-templates select="@* | node()"/></p></bodytext></listitem></xsl:when><xsl:when test="$streamID='UK22CF' and parent::legfragment and (preceding-sibling::leg:prelim or preceding-sibling::leg:info)"><xsl:element name="primlaw:bodytext"><xsl:element name="p"><xsl:apply-templates select="refpt"/><xsl:apply-templates select="*[not(self::refpt)] | text()"/></xsl:element></xsl:element></xsl:when><xsl:when test="$streamID='HK07' and parent::bodytext[parent::level[@leveltype='prec' or @leveltype='prec.grp' or @leveltype='precgrp' or @leveltype='precgrp1' or @leveltype='precgrp2' or parent::comm.chap or ancestor::level[@leveltype = 'prec.grp']]]"><form:p><xsl:apply-templates select="node() except inlineobject"/></form:p></xsl:when><!-- <xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'overview') and ancestor::source_cttr:annotations[not(@annotgroup='prov-al')]/heading/note[descendant::lnlink/marker['List of Provisions' or 'Defined Terms' or 'Government Website'][not(@id='OI13')]] | source_cttr:annotations[not(@annotgroup='prov-al')]/heading/remotelink">
<xsl:apply-templates/>
</xsl:when>--><xsl:otherwise><xsl:choose><!-- Awantika: 2017-10-26- Added the condition to check multiple text/@align in one p
as per CI instructions which is currently only for Canada applying for HK07.
Creating seperate <p> for each text/@align.--><xsl:when test="count(child::text/@align) >= 1 and $streamID='HK07'"><xsl:for-each select="child::*"><xsl:element name="p"><xsl:if test="self::*[1]/@align"><xsl:attribute name="align"><xsl:value-of select="self::*[1]/@align"/></xsl:attribute></xsl:if><xsl:apply-templates select="self::*"/></xsl:element></xsl:for-each></xsl:when><!-- Awantika:2017-10-27: p/text will be converted to <textitem> for AU20 for specific scenario --><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'history') and /CITATORDOC/source_cttr:body/source_cttr:content/source_cttr:annotations/heading/note[@id='HI4']| /CITATORDOC/source_cttr:body/source_cttr:content/source_cttr:annotations/heading/title[.='Assent']"><xsl:apply-templates select="@* | node()"/></xsl:when><!--Satbir: Added mdule for handling glp:note under p/text--><xsl:when test="$streamID='NZ03' and child::text/child::glp:note[not(child::node except glp:note)][ancestor::case:judgmentbody]"><xsl:apply-templates select="child::text/child::glp:note"/></xsl:when><!-- Awntika: 2017-12-13- Updated for webstar# 7065522 --><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'overview') and parent::note[ancestor::source_cttr:annotations[@id='OI2']/heading/title[.,'Former Title']]"><xsl:apply-templates select="node()"/></xsl:when><xsl:otherwise><p><!-- JL this "if" condition that moves text align att value to the parent p is generic and cannot be used for CA --><xsl:apply-templates select="@*"/><!-- <xsl:if
test="not(@style) and child::text[@align[. != '']] and not(child::text[2]) and not(starts-with($streamID, 'CA'))">
<xsl:attribute name="align">
<xsl:value-of select="text/@align"/>
</xsl:attribute>
</xsl:if>--><!-- Chaitanya :Making the for the P/@align as CA08 require this change, Luckabaugh, Joy H. (LNG-HBE) <Joy.Luckabaugh@lexisnexis.com> has approved to change this module --><xsl:if test="not(@style) and child::text[@align[. != '']] and not(child::text[2])"><xsl:attribute name="align"><xsl:value-of select="text/@align"/></xsl:attribute></xsl:if><!-- JD: 2017-07-25: modifying the above for NZ18 create @align from only the first text/align so as to not concat --><xsl:if test="not(@style) and child::text[@align[. != '']] and $streamID=('NZ18','AU04','NZ13')"><xsl:attribute name="align"><!-- take the @align from the first child <text> (don't concatenate all child text/@align values) --><xsl:value-of select="text[1]/@align"/></xsl:attribute></xsl:if><!-- Vikas Rohilla : Created desig altdesig before other element to meet schema ordering --><!-- create ref:anchor before other elements to meet schema ordering --><xsl:if test="not($streamID=('UK06','UK07'))"><xsl:apply-templates select="(refpt | text/refpt), edpnum, pnum"/></xsl:if><!-- the above is the wrong order for legis and regulation if pnum goes to desig and edpnum goes to altdesig --><xsl:if test="$streamID=('UK06','UK07')"><xsl:apply-templates select="(refpt | text/refpt), pnum, edpnum"/></xsl:if><!-- JD: 2017-07-31: added loop in order to properly wrap p/link elements and proces other children when present --><xsl:for-each select="*"><xsl:choose><!--SS: Added this condition for p/link becomes p/text/ref:lnlink - HK07--><!-- JD: 2017-07-28: this produces an extra <text> when there is a child <link> AND a child <text>;
adding "and not(child::text)" --><xsl:when test="self::link"><xsl:element name="text"><!--<xsl:apply-templates />--><xsl:call-template name="generic-link"/></xsl:element><!--SS: Added "except link" condition for handling p/link - HK07--><!--<xsl:apply-templates
select="*[not(self::refpt | self::edpnum | self::pnum)] except link | text()"/>--></xsl:when><!--SS: Added template for converting images from inline to figure/inline--><xsl:when test="child::inlineobject[$streamID='AU18']"><text><xsl:apply-templates/></text></xsl:when><xsl:otherwise><xsl:apply-templates select=".[not(self::refpt | self::edpnum | self::pnum)]"/></xsl:otherwise></xsl:choose></xsl:for-each><!-- Vikas Rohilla : Created desig altdesig before other element to meet schema ordering --><!-- create ref:anchor before other elements to meet schema ordering --><!--<xsl:apply-templates select="(refpt | text/refpt), edpnum, pnum"/>
<!-\-SS: Added "except link" condition for handling p/link - HK07-\->
<!-\- JD: removing 'except link' -\->
<xsl:apply-templates
select="*[not(self::refpt | self::edpnum | self::pnum)] except link | text()"/>--><xsl:if test="note[@notetype='xref'] and $streamID='UK11DN'"><xsl:for-each-group select="*" group-adjacent="if (self::note) then 1 else 0"><xsl:choose><xsl:when test="current-grouping-key()=1"><!-- <xsl:apply-templates select="ancestor::p/text"/>--><text><marginnote><ref:anchor><xsl:attribute name="id"><xsl:value-of select="generate-id()"/></xsl:attribute><xsl:attribute name="anchortype"><xsl:text>local</xsl:text></xsl:attribute></ref:anchor><bodytext><xsl:for-each select="current-group()"><xsl:apply-templates select="@* | node()"/></xsl:for-each></bodytext></marginnote></text></xsl:when></xsl:choose></xsl:for-each-group></xsl:if></p></xsl:otherwise></xsl:choose><xsl:for-each select="following-sibling::level"><xsl:call-template name="following_p_level"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="p/@style"><xsl:choose><xsl:when test=". = 'right' or . = 'left' or . = 'center'"><xsl:attribute name="align"><xsl:value-of select="."/></xsl:attribute></xsl:when><xsl:otherwise><xsl:message>'p' element 'style' attribute has unexpected and unmappable value<xsl:value-of select="."/>and will be omitted on output.</xsl:message></xsl:otherwise></xsl:choose></xsl:template>
Template
p[parent::glp:note[parent::text]][$streamID = 'CA01' or $streamID = 'CA02CC' or $streamID
= 'CA04']
Documentation
Description
Vikas Rohilla : Added template for the streamID CA01
Sudhanshu Srivastava : Added streamID CA02CC
Namespace
No namespace
Match
p[parent::glp:note[parent::text]][$streamID = 'CA01' or $streamID = 'CA02CC' or $streamID
= 'CA04']
Awantika: Added template to handle p/inlineobject in HK07 to p/text/ref:inlineobject
JL: this isn't going to account for all scenarios; moved functionality to inlineobject templates
from text dita: <note><b>(For CANADA Content Stream only )</b>Only move the <sourcexml>
text@align</sourcexml> to the parent <targetxml>p</targetxml> if it is the only
text in <sourcexml>p</sourcexml>, Otherwise, wrap the <sourcexml>text</sourcexml>
with <targetxml>p</targetxml> and move the <sourcexml>@align</sourcexml> attribute
to the newly created <targetxml> p</targetxml>.</note>
<section>
<codeblock> <p> <text>Dated at Calgary, Alberta this 31 day of March
1998.</text> <text>The Honourable W. Kenneth Moore, Chief Justice of
the Court of Queen's Bench of Alberta</text> <text
align="center">ALBERTA RULES</text> <text>Rules of practice made
pursuant to subsection 745.64 of the Criminal Code to reflect the changes made
to the Criminal Code regarding applications for reduction in the number of years
of imprisonment without eligibility for parole.</text> </p> </codeblock>
<b>Becomes</b>
<codeblock> <p> <text>Dated at Calgary, Alberta this 31 day of March
1998.</text> <text>The Honourable W. Kenneth Moore, Chief Justice of
the Court of Queen's Bench of Alberta</text> </p> <p
align="center"> <text>ALBERTA RULES</text> </p> <p>
<text>Rules of practice made pursuant to subsection 745.64 of the Criminal
Code to reflect the changes made to the Criminal Code regarding applications for
reduction in the number of years of imprisonment without eligibility for
parole.</text> </p> </codeblock>
</section>
JL: seems like the @nl handling will not behave properly unless we move it to the text template.
I moved it to XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_text-LxAdv-text-with-test-for-whitespace-content.xsl
PLEASE LOOK THERE!!!!!! IF YOU NEED TO ADD IT TO ANOTHER MODULE FOR ELEMENT <text>
BRT: included this specific text match template because it's part of p[@nl]. Added this template
<xsl:template match="p[@nl != '']/text">
<xsl:element name="text">
<xsl:apply-templates select="@*"/>
<!-\- BRT add number of nl that are in p/@nl -\->
<xsl:call-template name="add_nl">
<xsl:with-param name="length" select="parent::p/@nl"/>
<xsl:with-param name="i" select="1"/>
</xsl:call-template>
<!-\- BRT remove hard-coded nl that are in source -\->
<xsl:apply-templates select="*[not(self::nl)] | text()"/>
</xsl:element>
</xsl:template>
<xsl:template name="add_nl">
<xsl:param name="length" select="."/>
<xsl:param name="i" select="1"/>
<!-\- BRT: create <nl/> for each iteration of @nl value -\->
<xsl:if test="$length > 0">
<xsl:element name="proc:nl"/>
<xsl:call-template name="add_nl">
<xsl:with-param name="length" select="$length - 1"/>
<xsl:with-param name="i" select="$i + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
Template
p[text[not(node()) or (string() and not(normalize-space()) and not(*))] and count(*)=1
]
Documentation
Description
JD: 2017-07-21: added trap for p containing only empty node or single whitespace to match DT output.
e.g.,
<p>
<text/>
</p>
Namespace
No namespace
Match
p[text[not(node()) or (string() and not(normalize-space()) and not(*))] and count(*)=1
]
Mode
#default
Import precedence
0
Source
<xsl:template match="p[text[not(node()) or (string() and not(normalize-space()) and not(*))] and count(*)=1 ]"/>
Template
p[* and not(*[not(self::text[* and not(text()) and not(*[not(self::nl)])])])]
Documentation
Description
JD: match p that has at least one element child, and don't have any children not named 'text', which doesn't have any text() or children not named 'br'
e.g.,
<p>
<text>
<nl/>
<nl/>
</text>
</p>
taken from https://stackoverflow.com/questions/11438787/find-an-element-that-only-has-one-other-kind-of-child
Namespace
No namespace
Match
p[* and not(*[not(self::text[* and not(text()) and not(*[not(self::nl)])])])]
Mode
#default
Import precedence
0
Source
<xsl:template match="p[* and not(*[not(self::text[* and not(text()) and not(*[not(self::nl)])])])]"/>
Template
p[not(node())][$streamID = 'AU13']
Documentation
Description
MDS 2017-08-11 - Added supression of completely empty paragraph elements. Only for specific streams
If p comes within /COMMENTARYDOC/comm:body/level/level/bodytext/form/bodytext/p then
p becomes form:p. And if @indent occurred into the p
then @indent becomes @indent and populated as follows:
Source XML
<form>
<bodytext searchtype="FORM">
<p><text><emph typestyle="bf">THIS AGREEMENT</emph> is made on                     2010</text></p>
.......
.......
<h align="center">1.        The Independent Expert has been appointed by the parties under clause .. of the Agreement to assist in resolving the dispute or to resolve the dispute by determining the meaning of clause …  of
the Agreement and also to determine which party or parties should pay the costs of and incidental to the resolution of the dispute.</h>
<h align="center">2.        The Independent Expert has accepted the appointment, and will assist in determining or will determine the dispute in accordance with the terms of this agreement.</h>
........
........
<h align="center"> </h>
</bodytext>
</form>
Becomes
<form:form>
<form:document annotated="false" official="false" typeofdoc="unnamed">
<form:bodytext>
<form:p>
<form:text><emph typestyle="bf">THIS AGREEMENT</emph> is made on                     2010</form:text></form:p>
......
......
<form:h align="center">1.       The Independent Expert has been appointed by the parties under clause .. of the Agreement to assist in resolving the
dispute or to resolve the dispute by determining the meaning of clause … � of the Agreement and also to determine which party or parties should pay the costs of and
incidental to the resolution of the dispute.</form:h>
<form:h align="center">2.       The Independent Expert has accepted the appointment, and will assist in determining or will determine the dispute in accordance with the terms of this agreement.</form:h>
......
......
<form:h align="center"> </form:h>
</form:bodytext>
</form:document>
</form:form>
<xsl:template match="p[$streamID=('UK14', 'UK12')][(parent::blockquote)[ancestor::form[ancestor::COMMENTARYDOC]]]" priority="2"><!-- WPK: form:p is not schema valid within blockquote --><p><xsl:apply-templates select="@* | node()"/></p></xsl:template>
Template
@indent
Namespace
No namespace
Match
@indent
Mode
#default
Import precedence
0
Source
<xsl:template match="@indent"><!-- Original Target XPath: @indent --><xsl:attribute name="indent"><xsl:value-of select="."/></xsl:attribute></xsl:template>
Template
p[child::glp:note]
Documentation
Description
If glp:note comes within p then note
would become part of bodytext as a sibling to p
<li><lilabel>(b)</lilabel>
<p><text>a copy of the certificate.</text></p><!-- branch 2 -->
<p>
<glp:note>
<p><text><emph typestyle="it"><emph typestyle="it">Note 1</emph> If a form is approved under s 15 for this provision, the form must be used.</emph></text></p>
</glp:note></p>
Becomes
<listitem>
<label>(b)</label>
<bodytext>
<p><text>a copy of the certificate.</text></p>
<note>
<bodytext>
<p><text><emph typestyle="it"><emph typestyle="it">Note 1</emph> If a form is approved under s 15 for this provision, the form must be used.</emph></text></p>
</bodytext>
</note>
</bodytext>
Added from Rosetta_defitem-LxAdv-deflist_defitem_desfdesc_bodytext.xsl
If the source XML has deflist/defitem/glp:note it will be handled as deflist/defitem/defdesc/bodytext/note.
Source XML
<deflist>
<defitem>
...
<glp:note>
<p>
<text>
<emph typestyle="it">Note: The definition of
“community corrections officer” is
affected by section 10.</emph>
</text>
</p>
</glp:note>
</defitem>
</deflist>
Target XML
<deflist>
<defitem>
...
<defdesc>
<bodytext>
<note>
<bodytext>
<p>
<text>
<emph typestyle="it">Note: The definition of
“community corrections officer” is
affected by section 10.</emph>
</text>
</p>
</bodytext>
</note>
</bodytext>
</defdesc>
</defitem>
</deflist>
BRT: the following template is in base.xsl, match="p" in xsl:when test="child::glp:note" choice. I did not split this out in base.xsl - left 'as is' in when
Namespace
No namespace
Match
p[child::glp:note]
Mode
#default
Import precedence
0
Source
<xsl:template match="p[child::glp:note]"><!-- don't create p in LA if the child of p is glp:note. This won't work if there is more than glp:note that is a child of p --><xsl:apply-templates/></xsl:template>
Template
p/glp:note
Documentation
Description
BRT: the following template is taken from base.xsl, match="glp:note" in otherwise choice. I did not split this out in base.xsl - left 'as is' in otherwise choice
Namespace
No namespace
Match
p/glp:note
Mode
#default
Import precedence
0
Source
<xsl:template match="p/glp:note"><xsl:element name="note"><xsl:apply-templates select="@*"/><xsl:apply-templates select="heading"/><xsl:element name="bodytext"><!-- BRT: added choice group --><xsl:choose><!-- may be other elements that need to be added to this choice --><xsl:when test="remotelink"><xsl:element name="p"><xsl:element name="text"><xsl:apply-templates select="*[not(self::heading or self::refpt)]"/></xsl:element></xsl:element></xsl:when><xsl:otherwise><xsl:apply-templates select="*[not(self::heading or self::refpt)]"/></xsl:otherwise></xsl:choose></xsl:element></xsl:element></xsl:template>
Template
p-limited
Documentation
Description
p-limited becomes p. Also create a child element text within p for capturing the PCDATA of p-limited.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_p-limited-LxAdv-p.dita
BRT: this is the same rule as in Rosetta_p-limited_emph-LxAdv-p_text_emph.dita, and is already addressed there.
The otherwise condition in match="p-limited" creates p (no text), which conflicts with this rule.
Satbir: Define low priority in below template for p-limited because same template created in another xsl (Rosetta_entry_p-limited-LxAdv-entry_p.xsl)
When glp:note occurs as a direct child of entry/p-limited then entry/p-limited/glp:note becomes entry/note. The entry/note will occur as a sibling to any p elements within the entry. If there is any text (PC-DATA) that is part of the entry but occurs immediately before the p-limited, an empty p element should be created immediately before the note as a sibling to the note.
entry/p-limited becomes entry/p. Also create a child element text within entry/p for capturing the PCDATA of entry/p-limited.
If multiple consecutive p-limited elements occur within
entry then create only one p
within entry and multiple child text
elements with the single p. Create one
p/text element for each p-limited
element.
Source XML
<entry>
<p-limited>Pleaded guilty to one charge of cultivating cannabis, one charge of possession for supply and one charge of supply.</p-limited>
<p-limited>The appellant was the owner of a horticultural property. No criminal history. Four rows of cannabis plants growing in an extension to a hothouse. Maturing plants, stalks from harvested plants, and traces of drying cannabis leaf found. A total of 303 cannabis plants grown in a hydroponic solution.</p-limited>
</entry>
Target XML
<entry>
<p>
<text>Pleaded guilty to one charge of cultivating cannabis, one charge of possession for supply and one charge of supply.</text>
<text>The appellant was the owner of a horticultural property. No criminal history. Four rows of cannabis plants growing in an extension to a hothouse. Maturing plants, stalks from harvested plants, and traces of drying cannabis leaf found. A total of 303 cannabis plants grown in a hydroponic solution.</text>
</p>
</entry>
Note: If l is a child of entry/p-limited then
entry/p-limited/l becomes
entry/p/list. For further clarification please see the following example.
Source XML
<entry colname="col2">
<p-limited>Act is partly in force:
<l>
<li>
<p>
<text>ss. 61 (a) as it repeals the definition of ...</text>
</p>
</li>
</l>
</p-limited>
</entry>
Target XML
<entry colname="col2">
<p>
<text>Act is partly in force:</text>
<list>
<listitem>
<bodytext>
<p>
<text>ss. 61 (a) as it repeals the definition of ...</text>
</p>
</bodytext>
</listitem>
</list>
</p>
</entry>
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_entry_p-limited-LxAdv-entry_p.dita
<xsl:template match="p-limited" priority="15"><xsl:variable name="docinfoidtext" select="/CITATORDOC/docinfo/source_docinfo:doc-id/text()"/><xsl:choose><xsl:when test="parent::table and preceding-sibling::tgroup"><xsl:element name="note"><xsl:element name="bodytext"><xsl:element name="p"><xsl:element name="text"><xsl:apply-templates/></xsl:element></xsl:element></xsl:element></xsl:element></xsl:when><xsl:when test="child::emph"><xsl:element name="p"><xsl:element name="text"><!-- Awantika:2017-11-24- Webstar # 7048152. If glp:note is coming in p-limited with emph then in target we need to take out glp:note target markup note
from p/text as schema does not allow note inside p/text.
entry/p-limited/glp:note to entry/note --><xsl:apply-templates select="node() except glp:note"/></xsl:element></xsl:element><xsl:apply-templates select="glp:note"/></xsl:when><!-- BRT: added the following case, result is entry/note --><xsl:when test="parent::entry and child::glp:note"><xsl:apply-templates/></xsl:when><!-- generalizing this condition --><!-- AS: As per the instructions for p-limited "p-limited becomes p. Also create a child element text within p for capturing the PCDATA of p-limited." --><xsl:when test="parent::entry"><!-- Awantika: For AU20 entry/p-limited becomes textitem --><xsl:choose><xsl:when test="contains(lower-case($docinfoidtext),'history') and parent::entry and $streamID='AU20'"><textitem><xsl:apply-templates/></textitem></xsl:when><xsl:otherwise><xsl:element name="p"><xsl:element name="text"><xsl:apply-templates/></xsl:element></xsl:element></xsl:otherwise></xsl:choose></xsl:when><!-- BRT: added the following --><xsl:when test="child::remotelink"><xsl:element name="p"><xsl:element name="text"><xsl:apply-templates/></xsl:element></xsl:element></xsl:when><xsl:when test="child::ci:cite"><xsl:element name="p"><xsl:element name="text"><xsl:apply-templates/></xsl:element></xsl:element></xsl:when><xsl:otherwise><xsl:element name="p"><xsl:apply-templates/></xsl:element></xsl:otherwise></xsl:choose></xsl:template>
Template
p-limited[child::ci:cite]
Documentation
Description
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
When remotelink occurs as a direct child of p-limited then p-limited/remotelink becomes p/text/lnlink.
<entry colname="col3" colsep="0" rowsep="0" align="right" valign="top">
<!-- ETC. -->
<p><text>
<ref:lnlink service="URL">
<ref:marker>
<ref:inlineobject>
<ref:locator>
<ref:locator-key>
<ref:key-name name="object-key"/>
<ref:key-value value="X-Y-kpmglogo"/> <!-- X and Y are LNI and SMI values obtained from CSSM -->
</ref:locator-key>
<ref:locator-params>
<proc:param name="componentseq" value="1"/>
<proc:param name="object-type" value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)-->
<proc:param name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params>
</ref:locator>
</ref:inlineobject>
</ref:marker>
<ref:locator>
<ref:locator-key>
<ref:key-name name="URL"/>
<ref:key-value value="http://www.kpmg.com.au/default.aspx?
tabid=145"/>
</ref:locator-key>
</ref:locator>
</ref:lnlink>
</text></p>
</entry>
Description
When ci:cite occurs as a direct child of p-limited then p-limited/ci:cite becomes p/text/lnci:cite.
Source XML
<entry>
<p-limited>Diagram drawn at August 16, 2001 hearing by Mr. Yakimishyn. Location plan NW 4 <ci:cite><ci:case><ci:caseref ID="cref00000588" spanref="cspan00000588"><ci:reporter country="US" value="N.E." normpubcode="627"/><ci:volume num="8"/><ci:page num="5"/></ci:caseref></ci:case><ci:content><ci:span spanid="cspan00000588">8 NE 5</ci:span></ci:content></ci:cite>-56-17-4. Submitted by Mr. Yakimishyn.</p-limited>
</entry>
Target XML
<entry>
<p><text>Diagram drawn at August 16, 2001 hearing by Mr. Yakimishyn. Location plan NW 4 <lnci:cite><lnci:case><lnci:caseref ID="cref00000588"><lnci:reporter country="US" value="N.E." normpubcode="627"/><lnci:volume num="8"/><lnci:page num="5"/></lnci:caseref></lnci:case><lnci:content>8 NE 5</lnci:content></lnci:cite>-56-17-4. Submitted by Mr. Yakimishyn.</text></p>
</entry>
Template
page[not(ancestor::entry) and not(parent::catchwordgrp or parent::catchwords)]page-generic
Documentation
Description
Instructions [common element]
page becomes ref:page and also create
doc:docinfo/doc:pagination/doc:pagination-scheme and
attributes are mapped as follows:
page/@count becomes
ref:page/@num
page/@reporter becomes
ref:page/@page-scheme and
doc:pagination-scheme/@page-scheme
ref:page/@page-scheme-type and
doc:pagination-scheme/@page-scheme-type should be
set to "reporter-abbreviation"
page/@text should be dropped.
page/@subdoc becomes
ref:page/@includeintoc.
Note: Do not create multiple identicaldoc:pagination-scheme. Source may have multiple
page with identical @reporter value.
Create only one doc:pagination-scheme for each unique
@reporter value.
Note: According to the LBU, the presentation spec expects the page references to generate
the displayable reporter part from the citation. The @text is
dropped because the stylesheet is expected to generate the displayable portion of
the
page break.
Source XML
<page count="3" reporter="alr" subdoc="true" text="256 ALR 1 at "/>
...
<page count="4" reporter="alr" subdoc="true" text="256 ALR 1 at "/>
If comma ( , ) or periods ( . ) occurs in attribute value of count i.e,
page/@count then comma or period should be stripped out
(removed) from target attribute value i.e, ref:page/@num.
Source XML
<page reporter="bpr" count="23,043" text="12 BPR 23,041 at " subdoc="true" />
If space occurs in attribute value of reporter i.e,
page/@reporter then underscore( _ ) should be used at the
place of space in target attribute value i.e,
ref:page/@page-scheme and doc:pagination-scheme/@page-scheme.
Source XML
<page reporter="Fam LR" count="1033" text="10 Fam LR 1032 at " subdoc="true"/>
If page is a child of li, then the
ref:page should be placed at the beginning of the
following label in the target.
Source XML
<l>
<li>
<lilabel>(a)</lilabel>
<p>
<text>if subparagraph (1)(b)(i) applies – under the provision of the new corporations legislation that corresponds to the relevant
old provision; or</text>
</p>
</li>
<li>
<page reporter="Qd R" count="147" text="[2004] 1 Qd R 146 at " subdoc="true"/>
<lilabel>(b)</lilabel>
<p>
<text>if subparagraph (1)(b)(ii) applies – as, or connected with, a prosecution for an offence against the provision of the new
corporations legislation that corresponds to the relevant old provision.</text>
</p>
</li>
</l>
Target XML
<list>
<listitem>
<label>(a)</label>
<bodytext>
<p>
<text>if subparagraph (1)(b)(i) applies – under the provision of the new corporations legislation that corresponds to the
relevant old provision; or</text>
</p>
</bodytext>
</listitem>
<listitem>
<label><ref:page page-scheme-type="reporter-abbreviation" page-scheme="Qd_R" num="147" includeintoc="true"/>(b)</label>
<bodytext>
<p>
<text>if subparagraph (1)(b)(ii) applies – as, or connected with, a prosecution for an offence against the provision of the new
corporations legislation that corresponds to the relevant old provision.</text>
</p>
</bodytext>
</listitem>
</list>
and
<doc:docinfo>
<doc:pagination>
<doc:pagination-scheme page-scheme="Qd_R" page-scheme-type="reporter-abbreviation"/>
</doc:pagination>
</doc:docinfo>
<xsl:template match="page[not(ancestor::entry) and not(parent::catchwordgrp or parent::catchwords)]" name="page-generic"><xsl:if test="@count!='' and matches(translate(@count,',.…',''),'^\d+$')"><!-- don't process if there is no value converted to @num (invalid), or if source @count is not a digit --><xsl:element name="ref:page"><xsl:attribute name="num"><xsl:value-of select="translate(@count,',.…','')"/></xsl:attribute><xsl:if test="@reporter!=''"><xsl:attribute name="page-scheme"><xsl:value-of select="translate(@reporter,' ','_')"/></xsl:attribute></xsl:if><xsl:if test="@subdoc!=''"><xsl:attribute name="includeintoc"><xsl:value-of select="@subdoc"/></xsl:attribute></xsl:if><xsl:attribute name="page-scheme-type"><xsl:text>reporter-abbreviation</xsl:text></xsl:attribute></xsl:element></xsl:if></xsl:template>
Note: If remotelink[@hrefclass="http"][@href] or
url/remotelink[@hrefclass="http"] is present, convert
according to the instructions for url/remotelink, only
creating a parent url if it is present.
Source XML
<p> <text> <person> <name.text>Norman
Lyall</name.text> <name.detail> <name.degree>BA,
LLB,</name.degree> </name.detail> <role>Solicitor of the
Supreme Court of New South Wales</role> </person> </text>
</p>
Target XML
<p> <text> <person:person>
<person:name.text>Norman Lyall</person:name.text>
<person:name.detail> <person:name.degree>BA,
LLB,</person:name.degree> </person:name.detail>
<role>Solicitor of the Supreme Court of New South Wales</role>
</person:person> </text></p>
<person:person> <person:name.text>The Hon R O
Blanch</person:name.text> <person:name.detail>
<person:name.honorific>AM</person:name.honorific>
</person:name.detail> ... </person:person>
MDS 2017-06-21 - Defined in /case/Rosetta_case.author-to-LexisAdvance_note-byline.xsl
JD: 2017-06-28: need to create the person:contributor/person:person wrappers, which is not included in /case/Rosetta_case.author-to-LexisAdvance_note-byline.xsl
MDS 2017-06-29 - The person:contributor/person:person wrapper is too included in the /case/Rosetta_case.author-to-LexisAdvance_note-byline.xsl :-P
<case:author>
<date>27 October 2000</date>
<person>
<name.text>M H WINNEKE</name.text>
</person>
<role>Associate to the President</role>
</case:author>
Target XML
<byline>
<date>27 October 2000</date>
<person:person>
<person:name.text>M H WINNEKE</person:name.text>
<role>Associate to the President</role>
</person:person>
</byline>
<case:constituent>
<role>Respondent's Counsel:</role>
<person>
<name.text>B Keith and V A Cochrane</name.text>
</person>
</case:constituent>
Target XML
<courtcase:counsel>
<role>Respondent's Counsel:</role>
<person:counselor>
<person:person>
<person:name.text>B Keith and V A Cochrane</person:name.text>
</person:person>
</person:counselor>
</courtcase:counsel>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_case.constituent_person-LxAdv-person.counselor_person.person.dita
Vikas Rohilla : Initial updated may be changed if required
<pgrp>
<heading>
<title>Background</title>
</heading>
<p>
<pnum count="1">[1]</pnum>
<text>
The present applicants are five
individuals who at one time or another were engaged by Combined
Insurance Company of America (Combined) as insurance agents.
In recent times, the five have sued Combined in the
Chief Industrial Magistrates’ Court of New South Wales claiming
entitlements both to annual leave and long service leave.
One of the principal issues to be resolved in those proceedings is
the question of whether the agents were employees of Combined,
as they contend, or rather independent contractors, as Combined contends.
No doubt the resolution of that issue will involve a close consideration
of a broad range of indicia. One of the matters to which
Combined points is a term in its contract with each agent by
which each agreed, or appears to have agreed, that his relationship
with Combined was not one of employment.
</text>
</p>
<p>
<pnum count="2">[2]</pnum>
<text>
That question is, therefore, now pending before the Chief
Industrial Magistrates Court. Notwithstanding that circumstance,
Combined has commenced the present proceeding in this court
seeking three heads of relief:
</text>
</p>
</pgrp>
Target XML
<pgrp>
<heading>
<title>Background</title>
</heading>
<p>
<desig value="1" inline="true">[1]</desig>
<text>
The present applicants are five
individuals who at one time or another were engaged by Combined
Insurance Company of America (Combined) as insurance agents.
In recent times, the five have sued Combined in the Chief Industrial
Magistrates’ Court of New South Wales claiming entitlements
both to annual leave and long service leave. One of the principal
issues to be resolved in those proceedings is the question of whether
the agents were employees of Combined, as they contend, or rather
independent contractors, as Combined contends. No doubt the resolution
of that issue will involve a close consideration of a broad range of indicia.
One of the matters to which Combined points is a term in its contract
with each agent by which each agreed, or appears to have agreed, that
his relationship with Combined was not one of employment.
</text>
</p>
<p>
<desig value="2" inline="true">[2]</desig>
<text>
That question is, therefore, now pending before the Chief
Industrial Magistrates Court. Notwithstanding that circumstance,
Combined has commenced the present proceeding in this court
seeking three heads of relief:
</text>
</p>
</pgrp>
Source XML
<pgrp id="BCA.C5.CHECK">
<heading>
<title>Check List for Lease prior to Lodgment (LPI August 2007)</title>
</heading>
<!-- ETC. -->
</pgrp>
Target XML
<pgrp xml:id="BCA.C5.CHECK">
<heading>
<title>Check List for Lease prior to Lodgment (LPI August 2007)</title>
</heading>
<!-- ETC. -->
</pgrp>
Source XML
<pgrp subdoc="true" toc-caption="Contributors">
<heading><title>Authors</title></heading>
<!-- ETC. -->
</pgrp>
Target XML
<pgrp includeintoc="true" alternatetoccaption="Contributors">
<heading><title>Authors</title></heading>
<!-- ETC. -->
</pgrp>
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_pgrp-LxAdv-pgrp.dita
BRT: this template is in the otherwise condition in base.xsl, but added the attributes to that template.
This rule is similar to a rule in another topic in which pggrp is converted to pggrp.
Awantika: Removed this and added it to case:appendix
<xsl:template xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" match="pgrp[parent::case:appendix and $streamID='HK03']">
<xsl:variable name="name" select="local-name()"/>
<xsl:if test="local-name(preceding-sibling::*[position()=1]) != $name">
<bodytext>
<pgrp>
<xsl:apply-templates />
<!-\- Match the next sibling if it has the same name -\->
<xsl:apply-templates select="following-sibling::*[1][local-name()=$name]" mode="nextpg"/>
</pgrp>
</bodytext>
</xsl:if>
</xsl:template>
<xsl:template match="pgrp" mode="nextpg">
<xsl:variable name="name" select="local-name()"/>
<pgrp xmlns="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:apply-templates /></pgrp>
<xsl:apply-templates select="following-sibling::*[1][local-name()=$name]" mode="nextpg"/>
</xsl:template>
@@@ This file has been autogenerated (although the DITA file already has embedded XSLT). Remove this comment after manual development complete! (also remove the embedded XSLT within the DITA above) @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_pnum-to-LexisAdvance_desig_ref.para.dita
<xsl:template match="pnum"><xsl:if test="$streamID=('HK03','AU01', 'NZ03','CA04','CA01' , 'CA10')"><desig><xsl:attribute name="value"><xsl:value-of select="@count"/></xsl:attribute><ref:para><xsl:attribute name="num"><xsl:value-of select="@count"/></xsl:attribute><xsl:if test="//ci:cite[position()=1]/ci:case/ci:caseref/ci:reporter/@value[1]"><xsl:attribute name="para-scheme"><!--<xsl:value-of select="(//ci:cite[position()=1]/ci:case/ci:caseref/ci:reporter/@value)[1]"/>--><!-- Awantika:2017-10-30- translated to remove the space and create underscore to get the valid attribute value--><xsl:value-of select="translate((//ci:cite[position()=1]/ci:case/ci:caseref/ci:reporter/@value)[1],' ','_')"/></xsl:attribute></xsl:if><xsl:attribute name="para-scheme-type">reporter-abbrev</xsl:attribute><xsl:apply-templates/></ref:para><!-- Awantika: Duplicate ref:para if case:courtcite/ci:cite/@type="cite4thisdoc" in AU01 and NZ03--><xsl:if test="$streamID=('AU01', 'NZ03') and //case:courtcite[ci:cite[@type='cite4thisdoc']]"><ref:para><xsl:attribute name="num"><xsl:value-of select="@count"/></xsl:attribute><!--Satbir: Added choose condition for ci:nz because NZ03 contet is not having ci:au markup in source--><xsl:choose><xsl:when test="not((//ci:nz/@courtcode)[1])"/><xsl:otherwise><xsl:attribute name="para-scheme"><xsl:value-of select="(//ci:nz/@courtcode)[1]"/></xsl:attribute></xsl:otherwise></xsl:choose><xsl:attribute name="para-scheme-type"><xsl:text>court-code</xsl:text></xsl:attribute></ref:para></xsl:if></desig></xsl:if></xsl:template>
Template
refptrefpt-generic
Documentation
Description
Instructions [common element]
Please note that the conversion of refpt into
ref:anchor must follow specific rules based on
its location in the source document. These context sensitive aspects are
not all discussed in detail in the general instructions given here. Please see
the specific document type instructions for more information regarding the
context sensitive conversion details of this element. If there is any
contradiction between these general instructions and the document type specific
instructions, the specific instructions should be given precedence.
Drop refpt when it occurs as a child of
ci:content or
case:casename.
refpt becomes ref:anchor. Attribute
@id becomes @id and
@type becomes @anchortype with
values tokenized as follows:
ref:anchor[@anchortype="global"]
ref:anchor[@anchortype="local"]
All occurrences of refpt/@type="ext" should map to
ref:anchor/@anchortype="global". If value of refpt/@type="local", or is omitted
or any other value the mapping should be ref:anchor/@anchortype="local"
Note: ref:anchor/@id that begins with a number must have an
underscore added at start.
Duplicate anchors should be suppressed. Repeating anchors are ok however (non
duplicate multiple anchors). Need to remove duplicates.
If refpt comes within l/li/lilabel
then ref:anchor will become the first child of
listitem.
entry/refpt becomes
entry/ref:anchor
If refpt comes within figure then
drop the refpt since id has dummy values.
If refpt comes with page as sibling
then drop the refpt element.
If refpt and remotelink occur as
adjacent siblings, refer to topic endnote to
endnote.
Note: Whenever an @xml:id has the same value as ANY
ref:anchor/@id, suppress the
@xml:id.
Source XML 1
<case:judgments> <glp:note> <refpt id="257_ALR_1_2"
type="ext"/> <remotelink dpsi="000G" refpt="257_ALR_1_1"
remotekey1="REFPTID" service="DOC-ID"> Previous page in this case
</remotelink> </glp:note> <case:order subdoc="true"
toc-caption="Orders"> <heading> <title>Orders</title>
</heading> <p> <text> Order that the questions stated in the
amended special case be answered as follows: </text> </p>
</case:order> </case:judgments>
Target XML 1
<courtcase:opinions> <note> <ref:anchor id="_257_ALR_1_2"
anchortype="global"/> ... </note> courtcase:order will be moved under
courtcase:body... <courtcase:opinions>
Source XML 2
Here is an example of refpt occurring within
ci:content.
Source XML 3: Element refpt comes with page element.
<p> <text> <refpt id="PAGE6" type="ext"/> <page
reporter="PBAP" text="Page " count="6"/> In civil trials the position is
summarised by Wrottesley, <emph typestyle="it">Principles of
Advocacy</emph>, p13: </text> </p>
Target XML 3
<p> <text> <ref:page num="6" page-scheme="PBAP"
page-scheme-type="reporter-abbreviation"/> In civil trials the position is
summarised by Wrottesley, <emph typestyle="it">Principles of
Advocacy</emph>, p13: </text> </p>
<xsl:template match="refpt" name="refpt-generic"><!-- Original Target XPath: ref:anchor --><xsl:variable name="dup"><xsl:call-template name="amIaDuplicate"/></xsl:variable><xsl:choose><xsl:when test="parent::leg:bodytext or parent::ci:content or parent::case:casename or ancestor::figure or preceding-sibling::page or following-sibling::*[1][self::page] or $dup='true'"/><xsl:otherwise><ref:anchor><xsl:apply-templates select="@*"/><xsl:if test="not(@type)"><xsl:attribute name="anchortype" select="'local'"/></xsl:if><xsl:if test="node()"><ref:anchortext><xsl:apply-templates select="node()"/></ref:anchortext></xsl:if></ref:anchor></xsl:otherwise></xsl:choose></xsl:template>
Template
refpt/@type
Documentation
Description
JL: @id and @xml:id transformations handled by module
XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_identifier-LxAdv-ID_data_type-HandlingDuplicates.xsl
Namespace
No namespace
Match
refpt/@type
Mode
#default
Import precedence
0
Source
<xsl:template match="refpt/@type"><!-- Original Target XPath: @anchortype --><xsl:attribute name="anchortype"><xsl:value-of select="if(.='ext') then 'global' else 'local'"/></xsl:attribute></xsl:template>
Template
case:judgementbody/h/emph/emph[refpt]
Documentation
Description
refpt child of emph to bodytext/p/ref:anchor id-CCCC-10265
case:judgmentbody/h/emph/emph/refpt becomes
bodytext/p/ref:anchor.
Source XML
<case:judgmentbody>
...
<h l="3">
<emph typestyle="ro">
<emph typestyle="it">
<refpt id="po.98-984a1" />
1. The question in issue
</emph>
</emph>
</h>
...
</case:judgmentbody>
Target XML
<bodytext>
...
<p>
<ref:anchor id="po.98-984a1”>
</p>
<h>
<emph typestyle="ro">
<emph typestyle="it">
1. The question in issue
</emph>
</emph>
</h>
...
</bodytext>
Changes
2012-08-30: Created.
refpt first child of leg:bodytext to primlaw:level/ref:anchor
id-CCCC-10459 If refpt is the immediate child of leg:bodytext then ref:anchor
will
become the first child of primlaw:level. Source XML <leg:level
xml:id="QLD_ACT_1895-15_SD1"> <leg:level-vrnt leveltype="subdoc" subdoc="true"
toc-caption="Anglican Church of Australia Act 1895 Amendment Act 1901">
<leg:heading ln.user-displayed="false"> <title align="center"> <emph
typestyle="bf"> Anglican Church of Australia Act 1895 Amendment Act 1901
</emph> </title> </leg:heading> <leg:levelbody>
<leg:bodytext searchtype="LEGISLATION"> <refpt id="QLD_ACT_1895-15_COMP1"
type="ext"/> <refpt id="QLD_ACT_1895-15_SD1" type="ext"/> <p>
<text>Queensland</text> </p> </leg:bodytext> ... Target XML
<primlaw:level leveltype="unclassified" includeintoc="true"
altternatetoccaption="Anglican Church of Australia Act 1895 Amendment Act 1901">
<ref:anchor id="QLD_ACT_1895-15_COMP1" anchortype="global"/> <ref:anchor
id="QLD_ACT_1895-15_SD1" anchortype="global"/> <primlaw:bodytext> <p>
<text>Queensland</text> </p> </primlaw:bodytext>
</primlaw:level> Changes 2012-08-30: Created.
Description
If refpt occurs under
level/heading/edpnum then
ref:anchor will become the first child of
admindoc:level.
Source XML
Target XML
Description
refpt child of level/heading/title to
seclaw:level/ref:anchor, primlaw:level/ref:anchor and section/ref:anchor id-CCCC-10454
If refpt is a child of level/heading/title then ref:anchor will become the first
child of seclaw:level, primlaw:level and section depending on the target schema.
AU Commentary-Form-Precedents: If refpt is a child of level/heading/edpnum and
refpt element has text then ref:anchor will become the first child of seclaw:level
and refpt text will retain seclaw:level/heading/altdesig
Source XML
<level id="ABCA_ASICA_ACT.SGM_ABCA.ASICA.PT1" leveltype="comm.chap">
<heading searchtype="COMMENTARY">
<title>
<refpt type="ext" id="ABCA.ASICA.PT1"/>
Part 1 — Preliminary [ss 1–6]
</title>
</heading>
...
Target XML
<seclaw:level xml:id="ABCA_ASICA_ACT.SGM_ABCA.ASICA.PT1" leveltype="unclassified">
<ref:anchor id="ABCA.ASICA.PT1" anchortype="global"/>
<heading>
<title>Part 1 — Preliminary [ss 1–6]</title>
</heading>
...
Source XML
<level id="BCA.C2.AGRP1.ATTJ" leveltype="attachment" subdoc="false" toc-caption="[14,090]
Attachment J Deed of Subcontractor's Warranty">
<heading>
<edpnum>
<refpt id="BCA.C2.AGRP1.ATTJ" type="ext">[14,090]</refpt>
</edpnum>
<desig><designum>Attachment J</designum></desig>
<title>Deed of Subcontractor's Warranty</title>
</heading>
...
Target XML
<seclaw:level leveltype="attachment" toc-caption="[14,090] Attachment
J Deed of Subcontractor's Warranty">
<ref:anchor id="BCA.C2.AGRP1.ATTJ" anchortype="global"/>
<heading>
<altdesig>[14,090]</altdesig>
<desig>Attachment J</desig>
<title>Deed of Subcontractor's Warranty</title>
</heading>
...
Changes
2012-08-30: Created
2012-12-07: Instruction and Example added: refpt has text.
Description
refpt child of p/text/emph to
p/ref:anchor id-CCCC-10457
p/text/emph/refpt becomes p/ref:anchor.
All occurrences of refpt[@type="ext"] should map to ref:anchor[@anchortype="global"].
If value of refpt[@type="local"], or is omitted or any other value the mapping should
be ref:anchor[@anchortype="local"].
If any text comes under the refpt then conversion needs to map in
target ref:anchor/ref:anchortext. (i.e.
p/text/emph/refpt becomes
p/ref:anchor/ref:anchortext).
Source XML
<p>
<text>
<emph>
<refpt id="x98-525a1"/>
Section 115 contains the general right of
appeal given to a defendant in proceedings
governed by the Summary Proceedings Act.
...
</emph>
</text>
</p>
Target XML
<p>
<ref:anchor id="x98-525a1" anchortype="local"/>
<text>
Section 115 contains the general right of
appeal given to a defendant in proceedings
governed by the Summary Proceedings Act.
...
</text>
</p>
Changes
2016-07-27: Added a note for handling of text which is
comes under the refpt in source.
2013-10-11: Added a note and update the target examples when refpt
comes without attribute [@type="ext"] and
[@type="local"] in source documents.
2012-08-30: Created.
Description
Instructions [common element]
Note: This topic is used in numerous conversion instructions for several LBUs. It is a
shared topic rather than duplicated to ensure consistency and accuracy. The xml
snippets contained in this topic reflect markup needed for the Apollo image handling
application. The UK is the first LBU to move from Apollo to the Blobstore
application for image handling. Therefore, if this is a UK conversion instruction
document, please refer to the following topics for correct image handling markup.
lnlink[@service="ATTACHMENT"] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10542)
inlineobject to
ref:inlineobject for BLOBSTORE images
(id-CCCC-10540)
link[@filename] to
ref:lnlink[@service="ATTACHMENT"] for BLOBSTORE
images (id-CCCC-10541)
Regardless of which of the use cases described below occurs, the attribute remotelink/@status is always suppressed, it is never output to the target document.
Use case: remotelink[@service='SEARCH']. The service type
"SEARCH" is not supported in New Lexis. Unless
remotelink[@hrefclass='http'] it is recommended that such
remotelink elements be copied into an xml comment. This retains the content for
future
analysis without creating unsupported target markup. The risk of this approach
is the loss
of ref:marker text content from display to the user. If there is a
remotelink/@hrefclass] attribute equal to "http" then the
remotelink is not copied into a comment but is instead converted to either a
url or ref:lnlink, see below for details.
Use case: remotelink[@service='QUERY']:
In General, convert the pcdata, but suppress the remotelink
tag and its attributes.
For the following exceptional contexts, do not convert the pcdata of
remotelink[@service="QUERY"]. Instead, suppress both the
pcdata and remotelink markup:
A corresponding product requirement shall be created with an instruction to build
the link on retrieval based on semantic markup in the document.
Use case: remotelink[@service='DOC-ID'] becomes
ref:crossreference with required child
ref:content and attribute
remotelink/@xml:lang becomes
ref:content/@xml:lang. For multiple, immediate, sibling
occurrences without intermediary text, group within a
ref:crossreferencegroup parent except for
lnci:content and title.
The value of ref:crossreference/@crossreferencetype should be
set to "seeAlso".
Create ref:crossreference/ref:locator/ref:locator-key with
attributes and children as follows:
If @remotekey1="DOC-ID" or
@remotekey1="DOCID" then
ref:key-name/@name will have the value
"DOC-ID".
key-value/@value will be the value of
@dpsi followed by hyphen and concatenated with
@refpt or @remotekey2, which
ever is present (if both are present, use
@remotekey2).
If @remotekey1="REFPTID" or
@remotekey1="REFPT" then
ref:key-name/@name will have the value
"DOC-ID".
ref:key-value/@value will be the value of
@dpsi followed by hyphen and concatenated with
@docidref.
Create ref:locator/@anchoridref with value from
@refpt or @remotekey2, which
ever is present (if both are present, use
@refpt). If @refpt is empty or only whitespace, do not output a @anchoridref.
Note: If remotelink/@dpsi is not present, use value from
docinfo:dpsi/@id-string or capture value from the LBU
manifest file.
Note: ref:locator/@anchoridref that begins with a number must
have an underscore added at start. Also apply other identifier data type format
as
used for xml:id and ref:anchor/@id
(e.g. change colon to underscore). Refer to the section titled "Identifiers to
ID Data Type -
Handling Pattern Restrictions", if that section exists in this CI.
Use case: remotelink[@service='URL'] or
remotelink[@hrefclass='http'][@href] or
remotelink[@href]and the data content of the remotelink is a URL. That is, the data content of
remotelink starts with text such as "http://...", "https://...",
"www.some.domain", or is of type (http | https | nohttp | mailto | ftp). In this
case,
remotelink becomes url, and populated as follows:
If the remotelink/@hrefclass attribute is present in the
source document, the remotelink[@hrefclass="http"] becomes
url and @href becomes
@normval. The value of the attribute
@hrefclass is prepended to the value of
@href with the addition of '://' to form the
@normval.
Exception: If content of @hrefclass is already present in
@href then do not concatenate. Populate
@normval with content of
@href.
When remotelink/@hrefclass does not exist in
remotelink then nothing will be prepended to the
@href value. That is, remotelink
with @href attribute but no @hrefclass
attribute converts to url where the
@normval attribute is set to
remotelink/@href.
Use case: remotelink[@service='URL'] or
remotelink[@hrefclass='http'][@href]but the data content of the remotelink is not a URL. That is, the data
content of remotelinkdoes not start with text such as "http://...", "https://...", "www.some.domain",
nor is it of type (http | https | nohttp | mailto | ftp). In this case,
remotelink becomes ref:lnlink with
children ref:marker and ref:locator,
populated as follows:
The ref:lnlink/@service attribute is set to "URL".
The contents of remotelink becomes the contents of child
ref:lnlink/ref:marker. Any subelements (such as
emph and inlineobject) are converted
as described elsewhere by instructions given for those specific elements.
The child ref:lnlink/ref:locator is created, and within it
the child ref:lnlink/ref:locator/ref:locator-key is created,
and within it the children
ref:lnlink/ref:locator/ref:locator-key/ref:key-name and
ref:lnlink/ref:locator/ref:locator-key/ref:key-value are
created.
The ref:key-name/@name attribute is set to "URL".
If the remotelink/@hrefclass attribute is present,
ref:key-value/@value is set to the combined value of
remotelink/@hrefclass, followed by "://", followed by the
value of remotelink/@href.
Exception: If content of @hrefclass is already present in
@href then do not concatenate. Populate
@value with content of @href.
If the remotelink/@hrefclass attribute is not present,
ref:key-value/@value is set to the value of
remotelink/@href.
Use case: remotelink[@href]
If remotelink doesn't have any attributes, then
remotelink should be suppressed, but any elements contained
within remotelink should be processed according to the appropriate
instructions.
Note:
In the source documents, remotelink is used for two distinct
purposes:
To create an inter-document link; a link to a location outside the containing
document.
To create link for a traditional URL.
If refpt and remotelink occurs as adjacent
siblings then refer to the instructions for converting endnote.
Note: Exception for NZ17CC: When remotelink is a child of
emph then conversion should suppress emph
element only and process remotelink as per above instruction. See
example 17.
Source XML 1: showing service type "DOC-ID" converted to ref:crossreference.
<remotelink service="DOC-ID" remotekey1="DOC-ID" dpsi="0062"
refpt="QLD_ACT_1992-48_20050831">31/8/2005 to
18/11/2005</remotelink>
Source XML 5: for link to URL, with URL as content
<remotelink href="www.statedevelopment.qld.gov.au" hrefclass="http" newwindow="YES">www.statedevelopment.qld.gov.au</remotelink>
<!-- The following illustrates scenario where content of @hrefclass is already present in @href and so values are not concatenated for target -->
<remotelink href="http://www.acmecorp.com" hrefclass="http" newwindow="YES">www.acmecorp.com</remotelink>
Target XML 5: for link to URL, with URL as content
Note: As shown here in Example 6, the use of an @href attribute without @hrefclass, where
the @href attribute does not itself contain an hrefclass, ("http://" for example),
is not advised because the resulting @normval would not contain
the hrefclass. Normalized values should be consistent in providing the href class.
The link to the target may not work.
Source XML 6: for link to URL with no hrefclass attribute, and with URL as
content
Target XML 6: for link to URL with no hrefclass attribute, and with URL as
content
<url normval="www.asx.com">www.asx.com</url>
Source XML 7: for link to URL, with non-URL text content
<remotelink href="www.asx.com" hrefclass="http" newwindow="YES" service="SEARCH" status="valid">Australian Securities Exchange (ASX)</remotelink>
<!-- The following illustrates scenario where content of @hrefclass is already present in @href and so values are not concatenated for target -->
<remotelink href="http://www.acmecorp.com" hrefclass="http" newwindow="YES">Acme Corporation</remotelink>
Target XML 7: for link to URL, with non-URL text content
Note: Please note that XML comments need to be added around markup ref:marker
if it is in ref:lnlink@service=”URL”and the
ref:key-value@value starts-with
('http://www.lexisnexis.com/au/legal/api'). Please see the below target xml for more
details.
Source XML 7a: for link to URL, with non-URL text content
If remotelink[@service= ‘DOC-ID’] is a child of
glp:note; glp:note becomes
note/bodytext/p/text, remotelink[@service=
‘DOC-ID’] becomes ref:crossreference (see
conversion rules in remotelink section).
Source XML 9:
<glp:note>
<remotelink dpsi="006P" refpt="AFL.FL.FLA75.PT1_2" remotekey1="REFPTID" service="DOC-ID" docidref="ABCD_5641" status="unval">
Next page in this legislation
</remotelink>
</glp:note>
Source XML 15: remotelink occurs as multiple, immediate siblings
and without intermediary text within title
<leg:level>
<leg:level-vrnt leveltype="prov1">
<leg:heading>
<title><refpt id="EU_LEGISLATION:31998L0096R_02:" type="ext"/>Corrigendum to Council <remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:Directive_98_96_EC_" dpsi="08LU" docidref="08LU_EU_LEGISLATION:Directive_98_96_EC_">Directive 98/96/EC</remotelink> of 14 December 1998 amending, inter alia, as regards unofficial field inspections under <remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:Directives_66_400_EEC__" dpsi="08LU" docidref="08LU_EU_LEGISLATION:Directives_66_400_EEC__">Directives 66/400/EEC, </remotelink>66/401/EEC, 66/402/EEC, 66/403/EEC, 69/208/EEC, 70/457/EEC and 70/458/EEC on the marketing of beet seed, fodder plant seed, cereal seed, seed potatoes, seed of oil and fibre plants and vegetable seed and on the common catalogue of varieties of agricultural plant species (OJ L 25 of 1.2
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:_EEC__66_401" dpsi="08LU" docidref="08LU_EU_LEGISLATION:_EEC__66_401">/EEC, 66/401</remotelink>
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:_EEC__66_402" dpsi="08LU" docidref="08LU_EU_LEGISLATION:_EEC__66_402">/EEC, 66/402</remotelink>
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:_EEC__66_403" dpsi="08LU" docidref="08LU_EU_LEGISLATION:_EEC__66_403">/EEC, 66/403</remotelink>
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:_EEC__69_208" dpsi="08LU" docidref="08LU_EU_LEGISLATION:_EEC__69_208">/EEC, 69/208</remotelink>
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:_EEC__70_457" dpsi="08LU" docidref="08LU_EU_LEGISLATION:_EEC__70_457">/EEC, 70/457</remotelink>/EEC and
<remotelink service="DOC-ID" remotekey1="REFPTID" refpt="EU_LEGISLATION:_70_458" dpsi="08LU" docidref="08LU_EU_LEGISLATION:_70_458"> 70/458</remotelink>/EEC on the marketing of beet seed, fodder plant seed, cereal seed, seed potatoes, seed of oil and fibre plants and vegetable seed and on the common catalogue of varieties of agricultural plant species (OJ L 25 of 1.2.1999)</title>
</leg:heading>
<!-- ETC. -->
</leg:level-vrnt>
</leg:level>
Target XML 15: remotelink occurs as multiple, immediate siblings
and without intermediary text within title
<primlaw:level leveltype="section">
<heading>
<title>Corrigendum to Council <ref:crossreference crossreferencetype="seeAlso"><ref:content>Directive 98/96/EC </ref:content><ref:locator anchoridref="EU_LEGISLATION_Directive_98_96_EC_"><ref:locator-key><ref:key-name name="DOC-ID"/><ref:key-value value="08LU-08LU_EU_LEGISLATION_Directive_98_96_EC_"/></ref:locator-key></ref:locator></ref:crossreference> of 14 December 1998 amending, inter alia, as regards unofficial field inspections under <ref:crossreference crossreferencetype="seeAlso"><ref:content>Directives 66/400/EEC, </ref:content><ref:locator anchoridref="EU_LEGISLATION_Directives_66_400_EEC__"><ref:locator-key><ref:key-name name="DOC-ID"/><ref:key-value value="08LU-08LU_EU_LEGISLATION_Directives_66_400_EEC__"/></ref:locator-key></ref:locator></ref:crossreference>66/401/EEC, 66/402/EEC, 66/403/EEC, 69/208/EEC, 70/457/EEC and 70/458/EEC on the marketing of beet seed, fodder plant seed, cereal seed, seed potatoes, seed of oil and fibre plants and vegetable seed and on the common catalogue of varieties of agricultural plant species (OJ L 25 of 1.2
<ref:crossreference crossreferencetype="seeAlso">
<ref:content>/EEC, 66/401</ref:content>
<ref:locator anchoridref="EU_LEGISLATION__EEC__66_401">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="08LU-08LU_EU_LEGISLATION__EEC__66_401"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>
<ref:crossreference crossreferencetype="seeAlso">
<ref:content>/EEC, 66/402</ref:content>
<ref:locator anchoridref="EU_LEGISLATION__EEC__66_402">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="08LU-08LU_EU_LEGISLATION__EEC__66_402"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>
<ref:crossreference crossreferencetype="seeAlso">
<ref:content>/EEC, 66/403</ref:content>
<ref:locator anchoridref="EU_LEGISLATION__EEC__66_403">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="08LU-08LU_EU_LEGISLATION__EEC__66_403"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>
<ref:crossreference crossreferencetype="seeAlso">
<ref:content>/EEC, 69/208</ref:content>
<ref:locator anchoridref="EU_LEGISLATION__EEC__69_208">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="08LU-08LU_EU_LEGISLATION__EEC__69_208"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>
<ref:crossreference crossreferencetype="seeAlso">
<ref:content>/EEC, 70/457</ref:content>
<ref:locator anchoridref="EU_LEGISLATION__EEC__70_457">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="08LU-08LU_EU_LEGISLATION__EEC__70_457"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>/EEC and
<ref:crossreference crossreferencetype="seeAlso">
<ref:content> 70/458</ref:content>
<ref:locator anchoridref="EU_LEGISLATION__70_458">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="08LU-08LU_EU_LEGISLATION__70_458"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>/EEC on the marketing of beet seed, fodder plant seed, cereal seed, seed potatoes, seed of oil and fibre plants and vegetable seed and on the common catalogue of varieties of agricultural plant species (OJ L 25 of 1.2.1999)</title>
</heading>
<!-- ETC. -->
</primlaw:level>
Source XML 16: remotelink[@service="QUERY"]
<p>
<text>Consultation Paper: The Award of Costs from Central Funds in Criminal
Cases - <remotelink service="QUERY"
remotekey1="DIGEST-CITATION(LNB News 06/11/2008 25)"
remotekey2="All Subscribed Current Awareness Sources" cmd="f:exp"
alttext="References to">LNB News 06/11/2008 25</remotelink>; </text>
</p>
Target XML 16: remotelink[@service="QUERY"]
<p>
<text>Consultation Paper: The Award of Costs from Central Funds in Criminal
Cases - LNB News 06/11/2008 25; </text>
</p>
Source XML 17: remotelink as a child of emph
<ci:cite searchtype="LEG-REF">
<ci:content>
<citefragment searchtype="LEG-NAME-REF">
<emph typestyle="it">
<remotelink dpsi="0069" remotekey1="REFPTID" service="DOC-ID" refpt="1952A52"
docidref="1952A52.BODY">Land Transfer Act 1952</remotelink>
</emph>
</citefragment>
<emph typestyle="it">, ss 62, 105 and 119</emph>
</ci:content>
</ci:cite>
Target XML 17: remotelink as a child of emph
<lnci:cite type="legislation">
<lnci:content>
<ref:crossreference crossreferencetype="seeAlso">
<ref:content>Land Transfer Act 1952</ref:content>
<ref:locator anchoridref="_1952A52">
<ref:locator-key>
<ref:key-name name="DOC-ID"/>
<ref:key-value value="0069-1952A52.BODY"/>
</ref:locator-key>
</ref:locator>
</ref:crossreference>
<emph typestyle="it">, ss 62, 105 and 119</emph>
</lnci:content>
</lnci:cite>
@@@ This file has been autogenerated. Remove this comment after manual development complete! @@@
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_refpt-Chof-level_heading_edpnum-LxAdv-admindoc.level_ref.anchor.dita
20170512: MCJ: This is a do nothing module as it is unlikely that the instructions can be implemented
on their own... it is more likely that the handling of level/heading/epdnum to admindoc:level/ref:anchor
will occur elsewhere.
<xsl:template name="remotelinkDOCID"><!-- Original Target XPath: ref:crossreference --><ref:crossreference><!-- following atts and inlineobject template from modules/cttr/HK08k_subseqcases_cttr.annot.xsl --><!-- Sudhanshu Srivastava : Added condition for parent cttr:annot and streamID CA03. --><!-- Awantika: Added inlineobject for AU01 --><xsl:attribute name="crossreferencetype" select="if (((parent::source_cttr:annot or parent::source_cttr:annot or ancestor::citefragment[ancestor::case:references]) and $streamID=('HK08' , 'AU02', 'AU04','UK05','CA03')) or (ancestor::citefragment and inlineobject and $streamID=('NZ09', 'AU17'))or (parent::ci:content and $streamID='AU20') or inlineobject and $streamID='AU01') then 'citatorAlert' else 'seeAlso'"/><xsl:if test="(parent::source_cttr:annot or parent::source_cttr:annot and $streamID=('HK08' , 'AU02', 'AU04','UK05','CA03')) or (ancestor::citefragment and inlineobject and $streamID=('NZ09', 'AU17')) or (parent::ci:content and $streamID='AU20') or inlineobject and $streamID='AU01'"><xsl:attribute name="referencedresourcetype" select="'citator'"/><xsl:apply-templates select="inlineobject" mode="citator-ref"/></xsl:if><!-- JD: 20170525: (from UK05) following if test for att 'referencedresourcesentiment' from modules/cttr/UK05_Citator_annotations_cttr.annot-LxAdv-cttr.refs.xsl --><xsl:if test="parent::source_cttr:annot/@signal or parent::source_cttr:annot/@signal and $streamID=('UK05','CA03')"><xsl:attribute name="referencedresourcesentiment"><xsl:choose><xsl:when test="parent::source_cttr:annot/@signal='citation'"><xsl:value-of select="'none'"/></xsl:when><xsl:when test="not(parent::source_cttr:annot/@signal='citation') and parent::source_cttr:annot/@signal"><xsl:value-of select="parent::source_cttr:annot/@signal"/></xsl:when><xsl:when test="parent::source_cttr:annot/@signal='citation'"><xsl:value-of select="'none'"/></xsl:when><xsl:otherwise><xsl:copy-of select="parent::source_cttr:annot/@signal"/></xsl:otherwise></xsl:choose></xsl:attribute></xsl:if><xsl:if test="ancestor::citefragment and inlineobject and $streamID=('AU17')"><xsl:attribute name="referencedresourcesentiment"><xsl:value-of select="lower-case(substring-before(inlineobject/@alttext, ' '))"/></xsl:attribute></xsl:if><!-- JL: Ok to output empty ref:content as ref:content is a required element --><!-- Awantika:24-07-2017: for AU20 added parent::ci:content --><ref:content><xsl:if test="$streamID='AU19_CC'"><xsl:attribute name="xml:lang"><xsl:value-of select="/CASEDOC/docinfo/docinfo:doc-lang/@lang"/></xsl:attribute></xsl:if><xsl:copy-of select="@xml:lang"/><xsl:apply-templates select="if($streamID='UK12') then @* except(@xml:lang,@refpt) else @* except@xml:lang"/><xsl:if test="parent::source_cttr:annot and $streamID=('HK08' , 'AU02', 'AU04') or parent::ci:content and $streamID='AU20'"><xsl:value-of select="if (contains(inlineobject/@alttext, ' - Click for CaseBase entry')) then substring-before(inlineobject/@alttext, ' - Click for CaseBase entry') else inlineobject/@alttext"/></xsl:if><xsl:if test=" $streamID=('NZ09', 'AU17','AU01','NZ11','AU10','HK07')"><xsl:value-of select="if (contains(inlineobject/@alttext, ' - Click for CaseBase entry')) then substring-before(inlineobject/@alttext, ' - Click for CaseBase entry') else inlineobject/@alttext"/></xsl:if><!-- Sudhanshu Srivastava: Added if condition for getting ref content for CA03 --><xsl:if test="parent::source_cttr:annot and $streamID=('CA03')"><xsl:value-of select="if (contains(inlineobject/@alttext, 'QuickCITE - ')) then substring-after(inlineobject/@alttext, 'QuickCITE - ') else inlineobject/@alttext"/></xsl:if><!-- Awantika:24-07-2017: blobstore mapping was getting created therefore added 'except' for AU20 not to create that instead create the
below ref:locator--><xsl:apply-templates select="node() except inlineobject[parent::remotelink[parent::ci:content][$streamID=('AU20','HK07')]] except inlineobject[$streamID='AU01']"/></ref:content><ref:locator><xsl:for-each select=" if (@refpt) then @refpt else @remotekey2"><!-- MDS - 2017-05-12 - Created choose statement to deal with empty @refpt in source resulting in empty @anchoridref in target. --><xsl:choose><xsl:when test="normalize-space(.) = ''"/><xsl:otherwise><!-- JD: 2017-05-26: adding 'if' to prevent @anchoridref being added from markup like this:
<remotelink remotekey1="DOC-ID" service="DOC-ID" remotekey2="a1baecf6-dc1f-4bd0-ba0c-a91177f0efe6" dpsi="03W6" status="valid"/>
so as to match DT output.
--><!-- Sudhanshu Srivastava: addrd StreamID CA03, no need to generate anchoridref attribute. --><!-- Paul: this is often the case. May want "and @remotekey1="REFPTID" in this somewhere.
I'm getting it with DOC-ID in the attribute. AU08
PS2017042700263627135LNIAUCOURTRULES_input_VIC_REG_2008-14810000.xml
<remotelink dpsi="03AP" remotekey1="DOC-ID" remotekey2="LAWNOW_LEG_LAUNCH_VIC" service="DOC-ID">LawNow Home Page</remotelink>
If @remotekey1="REFPTID" then
– Create ref:locator/@anchoridref with value from @refpt or @remotekey2, which ever is present (if both are present, use
@refpt).--><xsl:if test="not($streamID='UK05' or $streamID='CA03' or $streamID='AU19_CC') and parent::remotelink/@remotekey1='REFPTID'"><xsl:attribute name="anchoridref"><xsl:call-template name="normalizeIdString"/></xsl:attribute></xsl:if></xsl:otherwise></xsl:choose></xsl:for-each><ref:locator-key><xsl:choose><!-- Awantika: Added choose as it is required to capture URL in ref:key-name while creating ref:crossreference for p/remotelink in AU20 --><xsl:when test="parent::p[parent::note][$streamID='AU20']"><ref:key-name name="URL"/></xsl:when><xsl:otherwise><ref:key-name name="DOC-ID"/></xsl:otherwise></xsl:choose><ref:key-value><xsl:attribute name="value"><!-- Awantika: Added choose as it is required to capture value of @href while creating ref:crossreference for p/remotelink in AU20 --><xsl:choose><xsl:when test="@dpsi"><xsl:value-of select="@dpsi"/></xsl:when><xsl:when test="parent::p[parent::note][$streamID='AU20']"><xsl:value-of select="@href"/></xsl:when><xsl:when test="not(@dpsi) and //docinfo/docinfo:dpsi/@id-string"><xsl:value-of select="//docinfo/docinfo:dpsi/@id-string"/></xsl:when><xsl:when test="not(@dpsi) and not(//docinfo/docinfo:dpsi/@id-string)"><xsl:value-of select="$dpsi"/></xsl:when><!-- JL if @dpsi isn't present, use DPSI from document or LBU manifest file as in CI above.
Verified with Pacific LBU 2017-11-06 --><!-- JL : dpsi may be validly missing if the link is invalid --><xsl:when test="@status=('unval','invalid')"><!-- no @dpsi however status is unvalidated or invalid so don't throw error --></xsl:when><xsl:otherwise><!--<xsl:value-of select="$dpsi"/>--><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select=" 'remotelink/@dpsi is missing and link cannot be correctly completed' "/><xsl:with-param name="errorType" as="xs:string" select=" 'ICCE' "/><xsl:with-param name="errorCode" as="xs:string*" select=" 'TBD' "/><xsl:with-param name="context" as="xs:string"><xsl:value-of select="base-uri()"/></xsl:with-param></xsl:call-template></xsl:otherwise></xsl:choose><xsl:text>-</xsl:text><xsl:choose><xsl:when test="$streamID='AU19_CC'"><xsl:value-of select="@refpt"/></xsl:when><!-- CSN - 2017/11/06 - Backing this change out from the last SVN Version becuase it may fix AU08 but it breaks links for the other Conversions
<xsl:when test=" @remotekey1 = 'DOC-ID' or @remotekey1 = 'DOCID' or @service='DOC-ID'">
--><xsl:when test=" @remotekey1 = 'DOC-ID' or @remotekey1 = 'DOCID'"><xsl:value-of select="if (@remotekey2) then @remotekey2 else @refpt"/></xsl:when><xsl:when test=" @remotekey1 = 'REFPTID' or @remotekey1 = 'REFPT' "><xsl:choose><xsl:when test="@docidref"><xsl:value-of select="@docidref"/></xsl:when><xsl:when test="@status=('unval','invalid')"><!-- no @docidref however status is unvalidated or invalid so don't throw error --></xsl:when><xsl:otherwise><!-- This should be an error message --><xsl:text>XXXX</xsl:text><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select=" 'remotelink/@docidref is missing and link cannot be correctly completed' "/><xsl:with-param name="errorType" as="xs:string" select=" 'ICCE' "/><xsl:with-param name="errorCode" as="xs:string*" select=" '403' "/><!--SNB: 2017-10-27 adding the XPATH of problem link to error output instead of previous base:uri() --><xsl:with-param name="context" as="xs:string"><xsl:call-template name="generateXPath"/></xsl:with-param><!--<xsl:with-param name="context" as="xs:string"><xsl:value-of select="base-uri()"/> </xsl:with-param>--></xsl:call-template></xsl:otherwise></xsl:choose></xsl:when></xsl:choose></xsl:attribute></ref:key-value></ref:locator-key></ref:locator></ref:crossreference></xsl:template>
<xsl:template match="remotelink[not(ancestor::docinfo:assoc-links)][ @service = 'DOC-ID' ]" mode="combineSiblingRemotelinks"><!-- output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/><!-- process immediate sibling remotelink elements one by one --><xsl:apply-templates select="following-sibling::node()[1][self::remotelink[not(ancestor::docinfo:assoc-links)][ @service = 'DOC-ID' ] ]" mode="combineSiblingRemotelinks"/></xsl:template>
<xsl:template match="remotelink[not(ancestor::docinfo:assoc-links)][ @service = 'DOC-ID' ][ not( preceding-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] ) ] [parent::li]" priority="1"><p><text><xsl:choose><xsl:when test=" following-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] and not(parent::ci:content)"><!-- multiple immediate sibling remotelinks, so group in ref:crossreferencegroup --><ref:crossreferencegroup><!-- output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/><!-- process immediate sibling remotelink elements one by one --><xsl:apply-templates select="following-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ]" mode="combineSiblingRemotelinks"/></ref:crossreferencegroup></xsl:when><xsl:otherwise><!-- no grouping needed, so just output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/></xsl:otherwise></xsl:choose></text></p></xsl:template>
For multiple, immediate, sibling
occurrences without intermediary text, group within a
<targetxml>ref:crossreferencegroup</targetxml> parent except for
<targetxml>lnci:content</targetxml> and <targetxml>title</targetxml>.<ul>
@@@ SBy: I do not understand what is meant by "except for lnci:content and title" since the examples have those under ref:crossreferencegroup even if there is only one remotelink[ @service = 'DOC-ID' ] sibling !!!
JL: seems like lnci:content/ref:crossreferencegroup is not schema valid
<xsl:template match="remotelink[not(ancestor::docinfo:assoc-links)][ @service = 'DOC-ID' ][ not( preceding-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] ) ]" priority="2"><xsl:choose><!-- BRT 1/30/17 fix issue with missing p element --><xsl:when test="parent::bodytext and $streamID = ('UK15_DS')"><p><text><xsl:call-template name="remotelinkDOCID"/></text></p></xsl:when><xsl:when test="$streamID=('AU10','NZ11') and ancestor::level/@leveltype='landingpage'"><!-- no grouping needed, it becomes seclaw:subjectmatterreference
which doesn't allow groupings so just output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/></xsl:when><xsl:when test=" following-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] and not(parent::ci:content)"><!-- multiple immediate sibling remotelinks, so group in ref:crossreferencegroup --><ref:crossreferencegroup><!-- output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/><!-- process immediate sibling remotelink elements one by one --><xsl:apply-templates select="following-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ]" mode="combineSiblingRemotelinks"/></ref:crossreferencegroup></xsl:when><xsl:otherwise><!-- no grouping needed, so just output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/></xsl:otherwise></xsl:choose></xsl:template>
Template
remotelink[ ( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains(
. , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][not(parent::ci:content)]remotelink-url-urltext
Documentation
Description
If there is a
<sourcexml>remotelink/@hrefclass]</sourcexml> attribute equal to "http" then the
remotelink is <b>not</b> copied into a comment but is instead converted to either a
<targetxml>url</targetxml> or <targetxml>ref:lnlink</targetxml>
remotelink[@service='URL'] or remotelink[@hrefclass='http'][@href] or remotelink[@href] and the data content of the remotelink is a URL
@@@ SBy: how does one check for "... or is of type (http | https | nohttp | mailto | ftp ..." ??? using contains...
Namespace
No namespace
Match
remotelink[ ( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains(
. , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][not(parent::ci:content)]
Mode
#default
Import precedence
0
Source
<xsl:template match="remotelink[ ( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][not(parent::ci:content)]" name="remotelink-url-urltext"><!-- @@@TODO: perhaps fix type (http | https | nohttp | mailto | ftp handling. Probably @hrefclass ? also check for case insensitivity --><!-- <li>Use case: <sourcexml>remotelink[@service='URL']</sourcexml> or
<sourcexml>remotelink[@hrefclass='http'][@href]</sourcexml> or
<sourcexml>remotelink[@href]</sourcexml>
<b>and</b> the data content of the remotelink is a URL. That is, the data content of
<sourcexml>remotelink</sourcexml> starts with text such as "http://...", "https://...",
"www.some.domain", or is of type (http | https | nohttp | mailto | ftp). In this case,
<sourcexml>remotelink</sourcexml> becomes <targetxml>url</targetxml> --><url><xsl:attribute name="normval"><xsl:if test=" @hrefclass and not( contains( @href , @hrefclass ) ) "><xsl:value-of select="@hrefclass"/><xsl:text>://</xsl:text></xsl:if><xsl:value-of select="normalize-space( @href )"/></xsl:attribute><xsl:apply-templates/></url></xsl:template>
Template
emph[parent::remotelink [( @service = 'URL' or @href ) and ( contains( . , 'www' )
or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][not(parent::ci:content)]]
Documentation
Description
JL emph is invalid as a child of url, so adding this:
Namespace
No namespace
Match
emph[parent::remotelink [( @service = 'URL' or @href ) and ( contains( . , 'www' )
or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][not(parent::ci:content)]]
Mode
#default
Import precedence
0
Priority
35
Source
<xsl:template match="emph[parent::remotelink [( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][not(parent::ci:content)]]" priority="35"><xsl:apply-templates/></xsl:template>
Template
remotelink[ ( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains(
. , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][parent::ci:content]
Documentation
Description
Awantika: If lnci:content/remotelink have the following scenarios:if it's href,url,or www.... then retain the content of remotelink and suppress the element
Awantika:11-07-2017: Added priority to resolve the conflict on template "remotelink[not(ancestor::docinfo:assoc-links)][ @service = 'DOC-ID' ][ not( preceding-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] ) ]"
Namespace
No namespace
Match
remotelink[ ( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains(
. , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][parent::ci:content]
Mode
#default
Import precedence
0
Priority
5
Source
<xsl:template match="remotelink[ ( @service = 'URL' or @href ) and ( contains( . , 'www' ) or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ][parent::ci:content]" priority="5"><xsl:apply-templates/></xsl:template>
Template
person/remotelink[$streamID='UK12']
Documentation
Description
2017-11-28 - MDS: person/remotelink output does not allow for ref:lnlink. url is sufficient for UK12 stream
Template
remotelink[ ( @service = 'URL' or @href ) and not( ( contains( . , 'www' ) or contains(
. , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ) ]remotelink-url
Documentation
Description
remotelink[@service='URL'] or remotelink[@hrefclass='http'][@href] but the data content of the remotelink is not a URL.
@@@ SBy: how does one check for "... nor is it of type (http | https | nohttp | mailto | ftp ..." ??? using contains...
Namespace
No namespace
Match
remotelink[ ( @service = 'URL' or @href ) and not( ( contains( . , 'www' ) or contains(
. , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ) ]
Mode
#default
Import precedence
0
Source
<xsl:template match="remotelink[ ( @service = 'URL' or @href ) and not( ( contains( . , 'www' ) or contains( . , 'http' ) or contains( . , 'mailto' ) or contains( . , 'ftp' ) ) ) ]" name="remotelink-url"><!-- @@@TODO: perhaps fix type (http | https | nohttp | mailto | ftp handling. Probably @hrefclass ? also check for case insensitivity --><!-- <li>Use case: <sourcexml>remotelink[@service='URL']</sourcexml> or
<sourcexml>remotelink[@hrefclass='http'][@href]</sourcexml>
<b>but</b> the data content of the remotelink is <b>not</b> a URL. That is, the data
content of <sourcexml>remotelink</sourcexml>
<b>does not</b> start with text such as "http://...", "https://...", "www.some.domain",
nor is it of type (http | https | nohttp | mailto | ftp). In this case,
<sourcexml>remotelink</sourcexml> becomes <targetxml>ref:lnlink</targetxml> with
children <targetxml>ref:marker</targetxml> and <targetxml>ref:locator</targetxml> --><ref:lnlink service="URL"><ref:marker><xsl:apply-templates/></ref:marker><ref:locator><ref:locator-key><ref:key-name name="URL"/><ref:key-value><xsl:attribute name="value"><xsl:if test=" @hrefclass and not( contains( @href , @hrefclass ) ) "><xsl:value-of select="@hrefclass"/><xsl:text>://</xsl:text></xsl:if><xsl:value-of select="normalize-space( @href )"/></xsl:attribute></ref:key-value></ref:locator-key></ref:locator></ref:lnlink></xsl:template>
Template
remotelink/@href
Namespace
No namespace
Match
remotelink/@href
Mode
#default
Import precedence
0
Source
<xsl:template match="remotelink/@href"/>
Template
remotelink[not(@*)]
Documentation
Description
suppress remotelink and retain its content as text
Template
emph[ remotelink and $streamID = 'NZ17-CCD' ]
Documentation
Description
@@@ SBy: TODO, need to coordinate with Mark S footnote/endote logic: <p>If <sourcexml>refpt</sourcexml> and <sourcexml>remotelink</sourcexml> occurs as adjacent
siblings then refer to the instructions for converting <sourcexml>endnote</sourcexml>.</p>
There's another separate module for this...
<xsl:template match="remotelink[(ancestor::docinfo:assoc-links)| (ancestor::docinfo:assoc-links-grp)] [parent::text] [ @service = 'DOC-ID' ][ not( preceding-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] ) ] [$streamID='UK15' or $streamID='UK12' or $streamID='UK14']" priority="40"><xsl:choose><xsl:when test=" following-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ] and not(parent::ci:content)"><!-- multiple immediate sibling remotelinks, so group in ref:crossreferencegroup --><!--<doc:related-content-item>
<doc:related-content-desc>
<p>
<text>--><ref:crossreferencegroup><!-- output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/><!-- process immediate sibling remotelink elements one by one --><xsl:apply-templates select="following-sibling::node()[1][self::remotelink[ @service = 'DOC-ID' ] ][not($streamID='UK15')]" mode="combineSiblingRemotelinks"/></ref:crossreferencegroup><!--</text>
</p>
</doc:related-content-desc>
</doc:related-content-item>--></xsl:when><xsl:otherwise><!-- no grouping needed, so just output ref:crossreference for the current remotelink --><xsl:call-template name="remotelinkDOCID"/></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="remotelink/@refpt[$streamID='UK12']" priority="25"><xsl:choose><xsl:when test="normalize-space(.)!=''"><xsl:attribute name="anchoridref"><xsl:call-template name="normalizeIdString"/></xsl:attribute></xsl:when><xsl:otherwise><xsl:comment>Mandatory element according to the CI</xsl:comment><xsl:call-template name="outputErrorMessage"><xsl:with-param name="messageText" as="xs:string" select=" 'remotelink/@refpt is missing and link cannot be correctly completed' "/><xsl:with-param name="errorType" as="xs:string" select=" 'ICCE' "/><xsl:with-param name="errorCode" as="xs:string*" select=" 'TBD' "/><xsl:with-param name="context" as="xs:string"><xsl:value-of select="base-uri()"/></xsl:with-param></xsl:call-template></xsl:otherwise></xsl:choose></xsl:template>
Template
remotelink[@refpt='dummy' and @status='unval'][$streamID='HK07']
Documentation
Description
SS 28-11-2017: Added handling of remotelink/@refpt='dummy' value comes in HK07.
Namespace
No namespace
Match
remotelink[@refpt='dummy' and @status='unval'][$streamID='HK07']
<xsl:template match="remotelink[@refpt='dummy' and @status='unval'][$streamID='HK07']"><xsl:apply-templates/></xsl:template>
Template
remotelink[key('idTypeValue', @refpt)[self::refpt]][not(ancestor::ci:content)][not(parent::source_cttr:annot
and $streamID=('HK08' , 'AU02', 'AU04','UK05','CA03'))][not(parent::docinfo:assoc-links-grp
and $streamID='AU04')]
Documentation
Description
If a remotelink is created as an inter-document
link in the source file, yet its target is contained within the same source file,
the remotelink must be converted to an
intra-document link.
For any given remotelink where its
@refpt value is equivalent to an
refpt/@id value within the same soure file, create an
intra-document link.
remotelink becomes
ref:lnlink.
The attribute remotelink/@status is always suppressed, it is never output to the target document.
The content of remotelink becomes
ref:marker.
Create ref:locator and populate the attribute
ref:locator/@anchoridref with the value of
remotelink/@refpt.
Note: ref:locator/@anchoridref that begins with a number must
have an underscore added at start. Also apply other identifier data type format as
used for xml:id and ref:anchor/@id
(e.g. change colon to underscore).
Source XML
...
<remotelink refpt="CTH_ACT_1958-62_PROVLIST" remotekey1="REFPTID"
service="DOC-ID">List of Provisions</remotelink>
...
<leg:heading>
<title><refpt id="CTH_ACT_1958-62_PROVLIST" type="ext"/>List of provisions</title>
<leg:heading>
...
Target XML
...
<ref:lnlink>
<ref:marker>List of Provisions</ref:marker>
<ref:locator anchoridref="CTH_ACT_1958-62_PROVLIST"/>
</ref:lnlink>
...
<ref:anchor id="CTH_ACT_1958-62_PROVLIST" anchortype="global"/>
<heading>
<title>List of provisions</title>
<heading>
...
Description
@@@ SBy: below is from Awntika and likely from QC code base, but not mentioned in DITA so commenting out for now
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_remotelink-self-inter-document-link-LxAdv-intra-document-link.dita
keys for standalone testing below. These keys need to be in the driver file for this module to work.
Awantika: 2017-12-29: Added not(parent::docinfo:assoc-links-grp and $streamID='AU04') for webstar #7078784
Namespace
No namespace
Match
remotelink[key('idTypeValue', @refpt)[self::refpt]][not(ancestor::ci:content)][not(parent::source_cttr:annot
and $streamID=('HK08' , 'AU02', 'AU04','UK05','CA03'))][not(parent::docinfo:assoc-links-grp
and $streamID='AU04')]
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_strike-LxAdv-strike.dita
Vikas Rohilla : Updated the template hegher the priorty
JD: removed priority; commented competing template in /modules/nonamespace/Rosetta_text-LxAdv-text.xsl;
this should be the default for all <strike> handling.
Contains the titling content for a table, and titled groups that contain rows of
cells ("entries"). Table now allows an optional heading element, which contains
the titling content as well. The titling elements directly within table - title
and subtitle - are deprecated in favor of using these elements inside the
heading.
table becomes table comes with
@frame becomes @frame
which has tokenized values as (top | bottom | topbot | all | sides | none)
and required child element is described below:
tgroup becomes tgroup
with attributes @cols becomes
@cols is the required attribute.
@colsep becomes
@colsep@rowsep becomes
@rowsep and child element includes:
colspec becomes
colspec and attributes are
converted as follows:
@align becomes
@align
@char becomes
@char
@charoff becomes
@charoff
@colname becomes
@colname
@colnum becomes
@colnum
@colsep becomes
@colsep
@colwidth becomes
@colwidth
@id may be dropped or may
require special handling. It may become
@ref:anchor and if so is
moved to the parent or higher ancestor element. This
will be specified in the the particular CI as it
will be done on a stream by stream basis and will
depend on the particular XPath of the table element.
In the absence of specific instructions elsewhere in
the CI, @id is dropped.
@rowsep becomes
@rowsep
@searchtype is dropped
@xml:lang becomes
@xml:lang
Note:
CALS table markup allows for units to be embedded in
the column width. Lexis Advance only recognizes an
integer in pixels and proportional, identified by a
number ending with "*".
If a non-Lexis Advance format is discovered a warning
should be raised.
If the LBU requires a conversion of CALS units to LA
accepted units, some of the conversions are detailed
below.
If colspec@colwidth ends in “in” (inch) them remove
“in” and multiply the value by 96 to convert to
pixel. Only keep the integer portion of the result.
These are not valid: 0.1, 12.86. These are valid:
12, 185
cm; follow the inches example above but use a
conversion value of 37.7952755904
mm; follow the inches example above but use a
conversion value of 3.77952755904
pt; follow the inches example above but use a
conversion value of 1.0
The following instructions apply to all table markup (table
element and its decendents) with @morerows, @colsep, and @rowsep
attributes:
Remove any instances of @morerows=0
If ALL occurrences of @colsep in one table have a value
of zero, remove them all from that table.
If ALL occurrences of @rowsep in one table have a value
of zero, remove them all from that table.
Note: Although these instructions apply to all content streams,
only the UK content streams and AU18 are known to have these
issues.
thead becomes
thead below is the required child
element:
row becomes
row below is the required
child element:
entry becomes
entry and comes with
@nameend becomes
@nameend@namest becomes
@namest@align becomes
@align with tokenized
values as (left | right | center | justify | char)
tbody becomes
tbody and child element includes:
row becomes
row and child element
includes:
entry becomes
entry and comes with
@nameend becomes
@nameend@namest becomes
@namest@char becomes
@char@align becomes
@align with tokenized
values as (left | right | center | justify | char)
Note: Multiple tgroup are retained for conversion.
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_table-LxAdv-table.dita
@SBy: this is from QC XSLT. Should it appear here?
BRT: process table with page elements (break table in row before each row//page, create ref:page, create another table starting from row//page
Namespace
No namespace
Match
table[descendant::entry/descendant::page]
Mode
#default
Import precedence
0
Priority
15
Source
<xsl:template match="table[descendant::entry/descendant::page]" priority="15"><!-- BRT create a separate table before the start of a row that contains entry/descendant::page --><xsl:for-each-group select=".//row" group-starting-with="row[entry/descendant::page]"><!-- BRT: If there is a ref:page in the current-group(), create the ref:page first --><xsl:if test="current-group()//page"><xsl:element name="ref:page"><xsl:attribute name="num"><xsl:value-of select="translate(current-group()//page/@count, ',', '')"/></xsl:attribute><xsl:if test="current-group()//page/@reporter"><xsl:attribute name="page-scheme"><xsl:value-of select="translate(current-group()//page/@reporter, ' ', '_')"/></xsl:attribute></xsl:if><xsl:if test="current-group()//page/@subdoc"><xsl:attribute name="includeintoc"><xsl:value-of select="current-group()//page/@subdoc"/></xsl:attribute></xsl:if><xsl:attribute name="page-scheme-type"><xsl:text>reporter-abbreviation</xsl:text></xsl:attribute></xsl:element></xsl:if><!-- BRT create separate table for each group --><xsl:element name="table" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><!-- BRT: Convert table, tgroup, and colspec --><xsl:copy-of select="ancestor::table/(@* except @id)"/><xsl:if test="ancestor::table/@id"><xsl:variable name="count" select="position()"/><xsl:for-each select="ancestor::table/@id"><xsl:attribute name="xml:id"><xsl:value-of select="concat(ancestor::table/@id, '_', $count)"/></xsl:attribute></xsl:for-each></xsl:if><xsl:element name="tgroup" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:copy-of select="ancestor::table[1]/tgroup/@*"/><xsl:for-each select="ancestor::table[1]//colspec"><xsl:element name="colspec" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:element></xsl:for-each><xsl:for-each select="ancestor::table[1]//thead"><xsl:element name="thead" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:copy-of select="@*"/><xsl:apply-templates/></xsl:element></xsl:for-each><xsl:element name="tbody" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:copy-of select="ancestor::table[1]//tbody/@*"/><!-- apply all the rows of the current group to the current table --><xsl:apply-templates select="current-group()"/></xsl:element></xsl:element></xsl:element></xsl:for-each-group></xsl:template>
Template
tabletable
Documentation
Description
@SBy: modified from QC XSLT
2017-10-17 - MDS: Added choose statment due to webstar 7025682.
2017-11-16 - CSN: Added UK03|case:dicisionsummary to existing 'when'. webstar 7050317.
<xsl:template match="table" name="table"><xsl:choose><xsl:when test="parent::entry or ((parent::case:decisionsummary or parent::case:typeofcase) and $streamID='UK03')"><p><table><xsl:copy-of select="@frame | @pgwide"/><!-- @SBy: only @frame is in DITA --><!-- @SBy: note @colsep | @rowsep addressed specifically in other template rules below --><xsl:apply-templates select="@* except (@frame, @pgwide)"/><xsl:apply-templates/></table></p></xsl:when><xsl:otherwise><table><xsl:copy-of select="@frame"/><!-- BRT 11/16/17 added special handling for @pgwide in UK content. If value is '0', output is '0', otherwise, the output is '1' --><xsl:choose><xsl:when test="$streamID = ('UK01', 'UK02', 'UK05', 'UK08CA','UK08OR', 'UK09', 'UK10', 'UK15', 'UK17', 'UK18','UK20','UK22LF')"><xsl:if test="@pgwide"><xsl:attribute name="pgwide"><xsl:choose><xsl:when test="@pgwide='0'"><xsl:value-of select="'0'"/></xsl:when><xsl:otherwise><xsl:value-of select="'1'"/></xsl:otherwise></xsl:choose></xsl:attribute></xsl:if></xsl:when><xsl:otherwise><xsl:copy-of select="@pgwide"/></xsl:otherwise></xsl:choose><xsl:copy-of select="@frame"/><!-- @SBy: only @frame is in DITA --><!-- @SBy: note @colsep | @rowsep addressed specifically in other template rules below --><xsl:apply-templates select="@* except (@frame, @pgwide)"/><xsl:apply-templates/></table></xsl:otherwise></xsl:choose></xsl:template>
Template
tgroup
Namespace
No namespace
Match
tgroup
Mode
#default
Import precedence
0
Source
<xsl:template match="tgroup"><tgroup><xsl:copy-of select="@cols"/><!-- @SBy: note @colsep | @rowsep addressed specifically in other template rules below --><xsl:apply-templates select="@* except @cols"/><xsl:apply-templates/></tgroup></xsl:template>
SNB 2017-10-17 creating a new template that I think probably oght to be the template for all rosetta conversions for colwidth...
the above template creates flat out WRONG rarget markup when here's a decimal ( colwidth="78.50pt" resulted in
colwidth="50*", and colwidth="80.00pt" resulted in colwidth="0*"), and catching an empty column width seems wise in general.
For LPA, we need to catch numbers with no * or units, which none of these templates do. The ones below for NZ111 and AU10 catch
decimal numbers well, but not the case of no units or *.
<xsl:template match="colspec[$streamID=('NZ11','AU10')]/@colwidth[contains(.,'.')]" priority="2"><!-- for use when there is a decimal value in @colwidth. it truncates the whole number and passes it through --><xsl:attribute name="colwidth"><!--<xsl:value-of select="."/>--><xsl:analyze-string select="." regex="([0-9\.]+)([*]|[a-z]+)"><xsl:matching-substring><xsl:variable name="wholenumber" select="number(substring-before(regex-group(1),'.'))"/><xsl:choose><xsl:when test="regex-group(2) = 'in'"><xsl:variable name="var1"><xsl:value-of select="number($wholenumber) * 96"/></xsl:variable><xsl:value-of select="$var1"/><xsl:value-of select="concat($var1, '*')"/></xsl:when><xsl:when test="regex-group(2) = 'cm'"><xsl:variable name="var1"><xsl:value-of select="number($wholenumber) * 37.7952755904"/></xsl:variable><xsl:value-of select="concat(substring-before($var1, '.'), '*')"/></xsl:when><xsl:when test="regex-group(2) = 'mm'"><xsl:variable name="var1"><xsl:value-of select="number($wholenumber) * 3.77952755904"/></xsl:variable><xsl:value-of select="concat(substring-before($var1, '.'), '*')"/></xsl:when><xsl:when test="regex-group(2) = 'pt'"><xsl:variable name="var1"><xsl:value-of select="number($wholenumber) * 1"/></xsl:variable><xsl:value-of select="concat($var1, '*')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat($wholenumber, '*')"/></xsl:otherwise></xsl:choose></xsl:matching-substring></xsl:analyze-string></xsl:attribute></xsl:template>
Template
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@morerows[. = '0']
Namespace
No namespace
Match
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@morerows[. = '0']
Mode
#default
Import precedence
0
Source
<xsl:template match="*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row or self::entry]/@morerows[. = '0']"/>
Template
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@morerows[. != '0']
Documentation
Description
I think we want to preserve morerows if they're not 0, otherwise we lose formatting
Namespace
No namespace
Match
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@morerows[. != '0']
Mode
#default
Import precedence
0
Source
<xsl:template match="*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row or self::entry]/@morerows[. != '0']"><xsl:copy-of select="."/></xsl:template>
Template
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@colsep[. = '0'][not(ancestor-or-self::table//@colsep[. != '0'])]
Documentation
Description
<li>If ALL occurrences of @colsep in one table have a value of
zero, remove them all from that table.
</li>
<li>If ALL occurrences of @rowsep in one table have a value of zero,
remove them all from that table. </li>
Namespace
No namespace
Match
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@colsep[. = '0'][not(ancestor-or-self::table//@colsep[. != '0'])]
Mode
#default
Import precedence
0
Source
<xsl:template match="*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row or self::entry]/@colsep[. = '0'][not(ancestor-or-self::table//@colsep[. != '0'])]"/>
Template
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@rowsep[. = '0'][not(ancestor-or-self::table//@rowsep[. != '0'])]
Namespace
No namespace
Match
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@rowsep[. = '0'][not(ancestor-or-self::table//@rowsep[. != '0'])]
Mode
#default
Import precedence
0
Source
<xsl:template match="*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row or self::entry]/@rowsep[. = '0'][not(ancestor-or-self::table//@rowsep[. != '0'])]"/>
Template
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@colsep[ancestor-or-self::table//@colsep[. != '0']]
Namespace
No namespace
Match
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@colsep[ancestor-or-self::table//@colsep[. != '0']]
Mode
#default
Import precedence
0
Source
<xsl:template match="*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row or self::entry]/@colsep[ancestor-or-self::table//@colsep[. != '0']]"><xsl:copy-of select="."/></xsl:template>
Template
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@rowsep[ancestor-or-self::table//@rowsep[. != '0']]
Namespace
No namespace
Match
*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row
or self::entry]/@rowsep[ancestor-or-self::table//@rowsep[. != '0']]
Mode
#default
Import precedence
0
Source
<xsl:template match="*[self::table or self::tgroup or self::colspec or self::thead or self::tbody or self::row or self::entry]/@rowsep[ancestor-or-self::table//@rowsep[. != '0']]"><xsl:copy-of select="."/></xsl:template>
Template
text[not(node()) or string() and normalize-space(replace(., '^[\t\p{Zs}]+$', ''))
= '']
Documentation
Description
Instructions [common element]
text becomes text, and optional attributes @cont should be suppressed from conversion, @align becomes @align must only be used to preserve mandated horizontal spacing and @align will be moved in parent p in New Lexis conversion.
<p><text align="right">TOBY HALLIGAN</text></p>
Becomes
<p align="right"><text>TOBY HALLIGAN</text></p>
Note: (For CANADA Content Stream only )Only move the text@align to the parent p if it is the only text in p, Otherwise, wrap the text with p and move the @align attribute to the newly created p.
<p>
<text>Dated at Calgary, Alberta this 31 day of March 1998.</text>
<text>The Honourable W. Kenneth Moore, Chief Justice of the Court of Queen's Bench of Alberta</text>
<text align="center">ALBERTA RULES</text>
<text>Rules of practice made pursuant to subsection 745.64 of the Criminal
Code to reflect the changes made to the Criminal Code regarding
applications for reduction in the number of years of imprisonment
without eligibility for parole.</text>
</p>
Becomes
<p>
<text>Dated at Calgary, Alberta this 31 day of March 1998.</text>
<text>The Honourable W. Kenneth Moore, Chief Justice of the Court of Queen's Bench of Alberta</text>
</p>
<p align="center">
<text>ALBERTA RULES</text>
</p>
<p>
<text>Rules of practice made pursuant to subsection 745.64 of the Criminal
Code to reflect the changes made to the Criminal Code regarding
applications for reduction in the number of years of imprisonment
without eligibility for parole.</text>
</p>
Original DITA file location: DITA\ConversionInstructions\Rosetta\common_newest\Rosetta_text-LxAdv-text.dita
*****************************************************************************
* NOTE: @align handling including CA exception is addressed in *
* /XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_p-LxAdv-p.xsl *
* because it can't be run from p/text context node. *
* NOTE: @nl is addressed here and not in *
* /XSLT/ContentArch/Rosetta-to-LA/modules/nonamespace/Rosetta_p-LxAdv-p.xsl *
* because it can't be run from p context node. *
****************************************************************************
JD: 2017-07-21: added trap for empty node or single whitespace to match DT output.
Namespace
No namespace
Match
text[not(node()) or string() and normalize-space(replace(., '^[\t\p{Zs}]+$', ''))
= '']
Mode
#default
Import precedence
0
Priority
2
Source
<xsl:template match="text[not(node()) or string() and normalize-space(replace(., '^[\t\p{Zs}]+$', '')) = '']" priority="2"/>
<xsl:template match="text"><xsl:variable name="docinfoidtext" select="/*/docinfo/docinfo:doc-id/text()"/><!-- Original Target XPath: text --><xsl:choose><xsl:when test="parent::p[@nl]"><xsl:call-template name="insert-vertical-space"/></xsl:when><xsl:otherwise><!-- Awantika: For AU20 history text becomes textitem --><xsl:choose><xsl:when test="$streamID='AU20' and parent::p[parent::note[@notetype='xref'][parent::heading]] and contains(lower-case($docinfoidtext),'history')"><textitem><xsl:apply-templates/></textitem></xsl:when><xsl:when test="$streamID='AU20' and parent::p[ancestor::source_cttr:annotations[@annotgroup='prov-am']] and contains(lower-case($docinfoidtext),'history')"><textitem><xsl:apply-templates/></textitem></xsl:when><!-- Awantika:2017-10-27: p/text will be converted to <textitem> for AU20 for specific scenario --><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'history') and parent::p[ancestor::source_cttr:annotations/heading/note[@id='HI4']]| child::heading/title[.='Assent']"><textitem><xsl:apply-templates/></textitem></xsl:when><xsl:otherwise><xsl:choose><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'overview') and ancestor::source_cttr:annotations[@id='OP3' or @id='OI7']/heading/note/l/li"><xsl:apply-templates/></xsl:when><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'overview') and ancestor::source_cttr:annotations[@id='OP15']"><xsl:apply-templates/></xsl:when><!-- Vikas Rohilla : Updated for the UK12 --><xsl:when test="child::note[@notetype!='xref'][$streamID = 'UK12']"><xsl:apply-templates/></xsl:when><!--Ravikant:2017-12-12: p/inlineobject move in form:p/from:text/figure for hk07 --><xsl:when test="$streamID='HK07' and parent::p[parent::bodytext[parent::level[@leveltype='prec' or @leveltype='prec.grp' or @leveltype='precgrp' or @leveltype='precgrp1' or @leveltype='precgrp2' or parent::comm.chap or ancestor::level[@leveltype = 'prec.grp']]]]"><form:text><xsl:apply-templates select="node()"/><xsl:apply-templates select="following-sibling::inlineobject[parent::p]"/></form:text></xsl:when><!-- Awantika:2017-11-02: p/text will be converted to <textitem> for AU20 for specific scenario --><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'overview') and parent::p[ancestor::source_cttr:annotations[child::heading/note/h[.='Former Title'] or child::heading/title[.='Former Title']]/source_cttr:annot/leg:info/note]"><xsl:apply-templates/></xsl:when><xsl:when test="$streamID='AU20' and contains(lower-case($docinfoidtext),'overview') and parent::p[ancestor::heading[child::title[starts-with(lower-case(.),'international equivalents') or starts-with(lower-case(.),'uniform equivalents')]]/note/l/li]"><xsl:apply-templates/></xsl:when><xsl:otherwise><text><!-- <xsl:apply-templates select="node() except refpt"/>--><!-- Awantika: Updated, as refpt should not be created in the text element --><!-- Priya Bardhan: Added ci:cite[@type='cite4thisdoc'] in except condition. Since, not required inside text --><xsl:apply-templates select="@*"/><xsl:apply-templates select="node() except (refpt,ci:cite[@type='cite4thisdoc'],copyright[$streamID='UK06'])"/><!-- Awantika: UK11DN- Need to merge the adjacent notes and move them to the end of the existing text --><xsl:if test="parent::p[note[@notetype='xref']] and $streamID='UK11DN'"><xsl:for-each-group select="parent::p[note[@notetype='xref']]/node()" group-adjacent="if (self::note) then 0 else 1"><xsl:choose><xsl:when test="current-grouping-key()=0"><!-- <xsl:apply-templates select="ancestor::p/text"/>--><marginnote><ref:anchor><xsl:attribute name="id"><xsl:value-of select="generate-id()"/></xsl:attribute><xsl:attribute name="anchortype"><xsl:text>local</xsl:text></xsl:attribute></ref:anchor><bodytext><xsl:for-each select="current-group()"><xsl:apply-templates select="@* | node()"/></xsl:for-each></bodytext></marginnote></xsl:when></xsl:choose></xsl:for-each-group></xsl:if></text></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:otherwise></xsl:choose></xsl:template>
Template
text/@align[$streamID!='CA09']
Documentation
Description
it doesn't make sense to address @align here, but to address it at the paragraph level.
What do we do for <p> elements that get emptied by having now-empty text? Right now they remain,
as passively specified through omission of use case.
<xsl:template name="insert-vertical-space"><xsl:element name="text" namespace="http://www.lexisnexis.com/xmlschemas/content/shared/base/1/"><xsl:apply-templates select="@*"/><!--- BRT add number of nl that are in p/@nl --><xsl:call-template name="add_nl"><xsl:with-param name="length" select="parent::p/@nl"/><xsl:with-param name="i" select="1"/></xsl:call-template><!-- BRT remove hard-coded nl that are in source --><xsl:apply-templates select="*[not(self::nl or self::refpt)] | text()"/></xsl:element></xsl:template>
<xsl:template match="text[parent::p[parent::glp:note[parent::text]]][$streamID='CA01' or $streamID='CA02CC' or $streamID='CA04']"><xsl:apply-templates/></xsl:template>
Template
text[parent::p[parent::frm:div | parent::frm:body |
parent::li[ancestor::frm:body] | parent::clause[ancestor::frm:div
or ancestor::frm:body]]][not(ancestor::footnote or ancestor::note)][$streamID='UK12']
Documentation
Description
Satbir: Set the low priority in below template because this is common template which is already define in "Rosetta_strike-LxAdv-strike.xsl"
JD: 2017-07-14: just use common template "Rosetta_strike-LxAdv-strike.xsl"; removing this version because:
1) this is the module for the <text> element, not the <strike> element
2) the handling is nearly identical
3) this version generates an empty @typestyle attribute, which causes validation errors.
<xsl:template match="text[parent::p[parent::sigblock[ancestor::frm:div or ancestor::frm:body]]][$streamID='UK12']"><xsl:apply-templates select="@*|node()"/></xsl:template>
<form>
<bodytext searchtype="FORM">
<p>
<text>
<emph typestyle="bf">THIS AGREEMENT</emph>
is made on        
          
   2010
</text>
</p>
.......
.......
<h align="center">
1.       
The Independent Expert has been appointed by the parties under clause
.. of the Agreement to assist in resolving the dispute or to
resolve the dispute by determining the meaning of clause …  of
the Agreement and also to determine which party or parties should
pay the costs of and incidental to the resolution of the dispute.
</h>
<h align="center">
2.       
The Independent Expert has accepted the appointment, and will assist
in determining or will determine the dispute in accordance with the
terms of this agreement.
</h>
........
........
<h align="center"> </h>
</bodytext>
</form>
Target XML
<form:form>
<form:document annotated="false" official="false" typeofdoc="unnamed">
<form:bodytext>
<form:p>
<form:text>
<emph typestyle="bf">THIS AGREEMENT</emph>
is made on       
        
      2010
</form:text>
</form:p>
......
......
<form:h align="center">
1.       
The Independent Expert has been appointed by the parties under clause ..
of the Agreement to assist in resolving the dispute or to resolve
the dispute by determining the meaning of clause … 
of the Agreement and also to determine which party or parties
should pay the costs of and incidental to the resolution of the dispute.
</form:h>
<form:h align="center">
2.       
The Independent Expert has accepted the appointment, and will
assist in determining or will determine the dispute in accordance
with the terms of this agreement.
</form:h>
......
......
<form:h align="center"> </form:h>
</form:bodytext>
</form:document>
</form:form>
@inline becomes @inline with tokenized values of "true" and "false"
@align becomes @align with tokenized
values and populated as:
title[@align="left"]
title[@align="right"]
title[@align="center"]
If the input document has title/defterm scenario then defterm within a title can be dropped, but the content of
the tag is retained and no text is dropped.
Exceptional scenario for CA Indices and CA06 Regs: title/nl
becomes title. nl will be replaces by
a white space in the target.
Exceptional scenario for CA Indices: When title is an child of
docinfo:hierlev/heading and contains word TITLE:
or NAME: or SITE: then conversion should drop the word TITLE: or NAME:
or SITE: from conversion.
<xsl:template match="title[not( normalize-space(replace(., '^[\t\p{Zs}]+$', '')) = '')]"><!--<xsl:param name="titleStringsToRemove" as="xs:string*" select="( 'TITLE:' , 'NAME:' , 'SITE:' ,':' )"/> --><!-- these are regular expressions --><!--pawan:added for CA15--><xsl:param name="titleStringsToRemove" as="xs:string*" select="if ($streamID = 'CA15') then ( 'TITLE: ' , 'TITRE: ' , 'TITLE/TITRE:' , 'TITRE/TITLE:','CITED/CITÉ: ', 'CITÉ/CITED: ', 'CITE/CITED: ', 'CITED: ' ) else ( 'TITLE:' , 'NAME:' , 'SITE:' ,':' )"/><xsl:variable name="outputText" as="xs:string*"><xsl:apply-templates/></xsl:variable><xsl:variable name="subtitletext"/><!-- Original Target XPath: title --><xsl:choose><!-- Due to jrnl:prelim outputting as nitf:hedline/nitf:h1, which does not have a child title. - See HK02_Articles for example --><xsl:when test="parent::heading/parent::jrnl:prelim"><xsl:apply-templates/></xsl:when><!-- do not output empty element title when it only contains refpt and is a child of heading --><xsl:when test="parent::heading and refpt and not(text()) and not(child::*[2])"/><!--SNB 2017-10-17 add title child of transcript for new embedded video content. Note that transcript
is a new element, so this cant interfere with any other processing--><xsl:when test="parent::transcript"><h><xsl:apply-templates select="@*"/><!-- refpts can't be output in title elements in target schemas --><xsl:apply-templates select="node() except refpt"/></h></xsl:when><xsl:otherwise><title><xsl:apply-templates select="@*"/><xsl:choose><xsl:when test=" $streamID = 'CA11' or $streamID = 'CA15' and parent::heading[parent::docinfo:hierlev] "><!-- remove any occurrence of $titleStringsToRemove strings but assume case sensitive --><xsl:sequence select=" lnf:removeSequenceOfStrings( string-join( $outputText , '' ) , $titleStringsToRemove , false() ) "/></xsl:when><!-- Vikas Rohilla : Added for the streamID CA01 --><xsl:when test="$streamID ='CA01' and ancestor::case:constituents"><xsl:sequence select=" lnf:removeSequenceOfStrings( string-join( $outputText , '' ) , $titleStringsToRemove , false() ) "/></xsl:when><!-- Awantika: Added for AU20 --><xsl:when test="$streamID='AU20' and following-sibling::subtitle"><xsl:value-of select="concat(.,' ','(',following-sibling::subtitle,')')"/></xsl:when><xsl:otherwise><!-- refpts can't be output in title elements in target schemas --><xsl:apply-templates select="node() except refpt"/></xsl:otherwise></xsl:choose></title></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="title/nl[ $streamID = ( 'CA11' ) ]"><!-- output a space. Note that otherwise nl becomes proc:nl which is allowed under title --><xsl:text></xsl:text></xsl:template>
If toc has a child page with a
following sibling toc-entry, page
should map to toc-entry/ref:page. The parent of
ref:page should be the toc-entry
that has been mapped from the following sibling of
toc/page.
Use case: url/remotelink when the content of
remotelink begins with "http".
url becomes url.
remotelink is suppressed, but its content is mapped as
folllows:
The content of remotelink is mapped to
url/@normval.
The content of remotelink also becomes the content of
url.
If emph occurs as a child remotelink,
it should be omitted.
Use case: url/remotelink when the content of
remotelink begins with "www." (4 characters, a period must follow "www").
url becomes url.
remotelink is suppressed, but its content is mapped as
follows:
The content of remotelink is mapped to
url/@normval, with the text "http://" prepended to the
value of url/@normval.
The content of remotelink also becomes the content of
url. Note that “http://” is not prepended to the
content of url.
If emph occurs as a child
remotelink, it should be omitted.
Use case: url/remotelink when the content of
remotelink does not begin with "http" or "www.". Drop
url start-tag and end-tag, but not its content. The
remotelink becomes ref:lnlink with
children ref:marker and ref:locator,
populated as follows:
The attribute remotelink/@status is always suppressed, it is never output to the target document.
The ref:lnlink/@service attribute is set to "URL".
The contents of remotelink becomes the contents of child
ref:lnlink/ref:marker. Any subelements (such as
emph and inlineobject) are converted
as described elsewhere by instructions given for those specific elements.
The child ref:lnlink/ref:locator is created, and within it
the child ref:lnlink/ref:locator/ref:locator-key is created,
and within it the children
ref:lnlink/ref:locator/ref:locator-key/ref:key-name and
ref:lnlink/ref:locator/ref:locator-key/ref:key-value are
created.
The ref:key-name/@name attribute is set to "URL".
If the remotelink/@hrefclass attribute is present,
ref:key-value/@value is set to the combined value of
remotelink/@hrefclass, followed by "://" (a colon and two
slashes), followed by the value of remotelink/@href.
Exception: If content of @hrefclass is already present in
@href then do not concatenate. Populate
@value with content of @href.
If the remotelink/@hrefclass attribute is not present,
ref:key-value/@value is set to the value of
remotelink/@href.
Drop remotelink/@newwindow.
Source XML showing url/remotelink when the content of
remotelink begins with "http"
Source XML showing url/remotelink when the content of
remotelink does not begin with "http" or "www."
<url>
<remotelink href="www.ato.gov.au" hrefclass="http" newwindow="YES"
service="SEARCH" status="valid"> Australian Tax Office (ATO)</remotelink>
</url>
<!-- The following illustrates scenario where content of @hrefclass is already present in @href and so values are not concatenated for target -->
<url>
<remotelink href="http://www.acmecorp.com" hrefclass="http">Acme Corporation</remotelink>
</url>
Target XML showing url/remotelink when the content of
remotelink does not begin with "http" or "www"
Set as 'true' if you want errors thrown for elements or attributes not explicitly matched elsewhere; elements are output and wrapped in error element. Set to 'false' to drop entirely plus no errors; set to 'noErrors' to suppress errors but still copy elements and attributes to the output; set to ROCKET (default) for error messages to be output with offending element/attribute suppressed (no forced schema validation error).
Current date/time and file being processed; these global variables only really used for debug/error processing. current-dateTime() outputs in YYYY-MM-DDTHH:MM:SS-TZ:TZ format when we need YYYY-MM-DD HH:MI:SS
NOTE: this condition should be in the 'blockquote' or 'case:decionsummary' template (output element would already be created)
"Note: If case:embeddedcase occurs as a child element of blockquote then conversion need to omit tag (blockquote) and retain content."
Note: The attribute @role is suppressed. The nesting
level of a doc:hierlev determines its role in the
hierarchy.
Note: if nl is coming as child of
docinfo:hierlev/heading/title then it should be
replaced by a white space in the target - Applicable for CA06-CA07
Note: Applicable for CA05-CA08: Attribute
docinfo:hierlev/@exclude-from-displayunits="true"
should be converted into attribute
doc:hier/@includeintoc="false".
Note: Applicable for CA09:title may contain num.
Suppress num tag but output content. For example:
<docinfo:hier><docinfo:hierlev><heading><title><num>6F1</num>
Appellant Form
(A1)</title></heading></docinfo:hierlev></docinfo:hier>
becomes
<doc:hier><doc:hierlev><heading><title>6F1
Appellant Form
(A1)</title></heading></doc:hierlev></doc:hier>
Note: Suppress inlineobject if it's found within
docinfo:hierlev element. i.e,
/docinfo/docinfo:hier/docinfo:hierlev/docinfo:hierlev/docinfo:hierlev/heading/inlineobject,
/docinfo/docinfo:hier/docinfo:hierlev/docinfo:hierlev/docinfo:hierlev/heading/subtitle/inlineobject
and
/docinfo/docinfo:hier/docinfo:hierlev/docinfo:hierlev/docinfo:hierlev/heading/title/inlineobject.
Source XML nl as child of
docinfo:hierlev/heading/title
<docinfo:hier> <docinfo:hierlev role="ancestor">
<heading> <title>Young Offenders Act (Canada)</title>
</heading> <docinfo:hierlev role="ancestor"> <heading>
<title>RULES OF YOUTH COURT REGULATION</title> </heading>
<docinfo:hierlev role="ancestor"> <heading>
<title>SCHEDULE</title> </heading> <docinfo:hierlev
role="me"> <heading> <title>ROVINCIAL COURT OF
ALBERTA<nl/>FORM 100<nl/>IN THE YOUTH DIVISION OF THE PROVINCIAL
COURT OF ALBERTA<nl/>NOTICE OF APPLICATION </title> </heading>
</docinfo:hierlev> </docinfo:hierlev> </docinfo:hierlev>
</docinfo:hierlev> </docinfo:hier>
Target XMLnl as child of
docinfo:hierlev/heading/title
<doc:hier> <doc:hierlev> <heading> <title>Young
Offenders Act (Canada)</title> </heading> <doc:hierlev>
<heading> <title>RULES OF YOUTH COURT REGULATION</title>
</heading> <doc:hierlev> <heading>
<title>SCHEDULE</title> </heading> <doc:hierlev>
<heading> <title>ROVINCIAL COURT OF ALBERTA FORM 100 IN THE YOUTH
DIVISION OF THE PROVINCIAL COURT OF ALBERTA NOTICE OF APPLICATION </title>
</heading> </doc:hierlev> </doc:hierlev> </doc:hierlev>
</doc:hierlev> </doc:hierlev>
Within UK08CA stream, when source is having emph followed by inlineobject inside base:h
element
h/emph/inlineobjectthan in Target it should Map with and becomes
emph/ref:inlineobject.
form/bodytext/h becomes form:h.
<h> <emph typestyle="bf">Table 2 Estimation of regression coefficients using the SUR
model <inlineobject type="image" mimetype="image/gif" filename="JFRC_2005_Vol13_Issue2_May_167_1.gif" />
</emph> </h> Becomes <emph typestyle="bf">Table 2 Estimation of regression
coefficients using the SUR model <ref:inlineobject> <ref:locator> <ref:locator-key>
<ref:key-name name="object-key"/> <ref:key-value value="X-Y-JFRC_2005_Vol13_Issue2_May_167_1"/>
<!-- X and Y are LNI and SMI values obtained from CSSM --> </ref:locator-key>
<ref:locator-params> <proc:param name="componentseq" value="1"/> <proc:param name="object-type"
value="image"/> <!-- allowable values: “image”; (from .jpg, .gif, .png, .bmp)--> <proc:param
name="object-smi" value=""/> <!-- This @value assignment is done by conversion program -->
</ref:locator-params> </ref:locator> </ref:inlineobject> </emph>
Adapted from "functx:trim" (http://www.xsltfunctions.com/xsl/functx_trim.html)
This function removes whitespace at the beginning and end of a string. Unlike the
built-in normalize-space function, it only removes leading and trailing whitespace,
not whitespace in the middle of the value. Whitespace is defined as it is in XML,
namely as space, tab, carriage return and line feed characters. If $arg is the empty
sequence, it returns a zero-length string.
Function to return a string in Title Case. Currently configured to exclude 'and',
'or'.
Call using <xsl:sequence select="string-join(for $x in tokenize($text,'\s') return
lnf:titleCase($x),' ')"/>
Description
replaceString END
titleCase START
function copied from http://p2p.wrox.com/xslt/80938-title-case-string.html
Namespace
urn:x-lexisnexis:conversion:global:functions:1
Parameters
QName
Namespace
Type
s
No namespace
xs:string
Import precedence
0
Source
<xsl:function name="lnf:titleCase"><xsl:param name="s" as="xs:string"/><xsl:choose><!-- when lower case string is 'and', 'or' just output --><xsl:when test="lower-case($s)=('and','or')"><xsl:value-of select="lower-case($s)"/></xsl:when><!-- when the string is in upper case the below would originally pass through in all upper case; commenting --><!--<xsl:when test="$s=upper-case($s)">
<!-\-<xsl:value-of select="$s"/>-\->
</xsl:when>--><!-- otherwise convert the first char to upper case and subsequent chars to lower case --><xsl:otherwise><xsl:value-of select="concat(upper-case(substring($s, 1, 1)), lower-case(substring($s, 2)))"/></xsl:otherwise></xsl:choose></xsl:function>
Function
lnf:stringToTitleCase (inputString, keepAllLower)
<xsl:function name="lnf:stringToTitleCase" as="xs:string"><xsl:param name="inputString" as="xs:string"/><!-- input string of one or more words --><xsl:param name="keepAllLower" as="xs:string*"/><!-- string sequence of words to keep as lowercase, such as the, or, and, for, of --><xsl:variable name="outputSequence" as="xs:string*"><xsl:for-each select="tokenize( $inputString , '\s' )"><xsl:choose><!-- when lower case string is any one of $keepAllLower, just output lower-case of it --><xsl:when test="lower-case( . ) = $keepAllLower"><xsl:value-of select="lower-case( . )"/></xsl:when><xsl:when test="contains( . , '-' )"><xsl:value-of select="lnf:genStringToTitleCase( . , $keepAllLower , '-' )"/></xsl:when><xsl:otherwise><xsl:value-of select="concat( upper-case( substring( . , 1 , 1 ) ) , lower-case( substring( . , 2 ) ) )"/></xsl:otherwise></xsl:choose></xsl:for-each></xsl:variable><xsl:sequence select="string-join( $outputSequence , ' ' )"/><!-- string join the sequence with a space as the separator --></xsl:function>
Function
lnf:genStringToTitleCase (inputString, keepAllLower, stringSeparator)
<xsl:function name="lnf:genStringToTitleCase" as="xs:string"><xsl:param name="inputString" as="xs:string"/><!-- input string of one or more words --><xsl:param name="keepAllLower" as="xs:string*"/><!-- string sequence of words to keep as lowercase, such as the, or, and, for, of --><xsl:param name="stringSeparator" as="xs:string"/><!-- character to break up/tokenize string, normally a space --><xsl:variable name="outputSequence" as="xs:string*"><xsl:for-each select="tokenize( $inputString , $stringSeparator )"><xsl:choose><!-- when lower case string is any one of $keepAllLower, just output lower-case of it --><xsl:when test="lower-case( . ) = $keepAllLower"><xsl:value-of select="lower-case( . )"/></xsl:when><xsl:otherwise><xsl:value-of select="concat( upper-case( substring( . , 1 , 1 ) ) , lower-case( substring( . , 2 ) ) )"/></xsl:otherwise></xsl:choose></xsl:for-each></xsl:variable><xsl:sequence select="string-join( $outputSequence , $stringSeparator )"/><!-- string join the sequence with the separator --></xsl:function>
Function
lnf:removeSequenceOfStrings (inputString, stringsToRemove, caseInsensitive)
Documentation
Description
lnf:removeSequenceOfStrings Function
This function was created to remove a set of substrings from an input string, if any
of these strings exist in the input string
$stringsToRemove is the input string sequence of *regex* items; the function will
go through this sequence one by one and remove all occurrences of each item in this
sequence.
The removal can be case sensitive or case insensitive.
This function will create the correct string for DOC-ID style links for certain conversions.
For the Internal Revenue Manual as an example, where $legacy-filename = 'IRSMNL',
and input string is 'IRM 3.10.72', the output string will be 'IRSMNL-3_10_72'.
Description
substringBeforeLast END
@SBy: 2016-11-04 ROM 1218 IRM Strategic: save the DOC-ID string logic for use in ref:cross-reference
Function
lnf:siblingBlockGrouping (groupingContainer, blockElements, siblingNodes)
Documentation
Description
lnf:siblingBlockGrouping Function
This function will sibling recursion type grouping for situations such as handling
children of "p" in the source converting to p/text - p/blockquote - p/text etc. in
the target; for that scenario, the $groupingContainer = 'text' (the text element),
$blockElements = ('blockquote', 'table', etc), and $siblingNodes would contain the
set of siblings that need to be split into groups of $groupingContainer elements broken
up by $blockElements.
Description
createValidIDstring END
NOTE: the next two functions can allow a transformation to not require sibling recursion moded rules such as mode="textEleRecurse". However, this function does not apply templates and so does not
work in the "target" space. One must use this function and throw results to a variable, then apply templates on that variable to transform the nodes to target format. Keep in mind that any processing
of such a variable only has the variable plus descendants in scope. So, for example, footnote processing that looks for matching node values in the entire source document tree will not actually
be searching the entire tree anymore, just the tree defined by the variable. In general, it is safest to use these functions when writing the entire document to a variable and then A-T on that variable.
@SBy: 2017-01-17 ROM 1218 IRM Strategic: general function version of sibling recursion type grouping, for situations such as
handling children of "p" in the source converting to p/text - p/blockquote - p/text etc. in the target
<xsl:function name="lnf:siblingBlockGrouping" as="item()*"><xsl:param name="groupingContainer" as="xs:string"/><!-- name of container element to group consecutive siblings under (typically the "text" element) --><xsl:param name="blockElements" as="xs:string*"/><!-- list of element names (can be empty string) that cannot be grouped under $groupingContainer (typically table, blockquote, etc) --><xsl:param name="siblingNodes" as="element()"/><!-- (remaining) sibling nodes (typically text() nodes and elements, can be instances of $groupingContainer too) to perform grouping on, all under a single element parent --><!-- save name of element parent --><xsl:variable name="siblingNodesParent" as="xs:string" select="name($siblingNodes)"/><xsl:for-each select="$siblingNodes/node()[1]"><xsl:choose><!-- if the first node is not an element, OR it is an element but there are no blockElements and it's not groupingContainer, or it's an element not in blockElements and it's not groupingContainer; then create container and move on --><xsl:when test=" not(self::*) or ( $blockElements = '' and not( name() = $groupingContainer ) ) or not( name() = $blockElements or name() = $groupingContainer ) "><xsl:element name="{$groupingContainer}" namespace=""><!-- create container --><xsl:choose><xsl:when test=" $blockElements = '' or not( following-sibling::node()[name() = $blockElements or name() = $groupingContainer] ) "><!-- no grouping required; just copy self and all following siblings to output, and no recurse --><xsl:copy-of select="."/><xsl:copy-of select="following-sibling::node()"/></xsl:when><xsl:otherwise><xsl:for-each select="following-sibling::node()[name() = $blockElements or name() = $groupingContainer][1]"><!-- grouping required; change context to the first blocker (either a group container or block element) and then copy over alll preceding siblings; close container --><xsl:copy-of select="preceding-sibling::node()"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:element><!-- if grouping was required in prior section; change context to the first blocker again to copy over the blocker, and if necessary initiate recursive call --><xsl:if test=" not( $blockElements = '' or not( following-sibling::node()[name() = $blockElements or name() = $groupingContainer] ) ) "><xsl:for-each select="following-sibling::node()[name() = $blockElements or name() = $groupingContainer][1]"><!-- copy over the blocker or container --><xsl:copy-of select="."/><!-- if there are following siblings, need to recurse --><xsl:if test="following-sibling::node()"><!-- update sibling list to be only the remaining following siblings --><xsl:variable name="siblingNodesUpdated" as="element()"><xsl:element name="{$siblingNodesParent}"><xsl:copy-of select="following-sibling::node()"/></xsl:element></xsl:variable><!-- recurse --><xsl:sequence select=" lnf:siblingBlockGrouping( $groupingContainer , $blockElements , $siblingNodesUpdated ) "/></xsl:if></xsl:for-each></xsl:if></xsl:when><!-- first node is an element, AND it is an element that is either in blockElements or in groupingContainer. This is the only other possibility, so using xsl:otherwise. Copy myself over, and recurse --><!--xsl:when test=" name() eq $blockElements or name() eq $groupingContainer "--><xsl:otherwise><!-- since we are a blocker or container, copy over myself --><xsl:copy-of select="."/><!-- if there are following siblings, need to recurse --><xsl:if test="following-sibling::node()"><!-- update sibling list to be only the remaining following siblings --><xsl:variable name="siblingNodesUpdated" as="element()"><!-- JD: 2017-04-04: added namespace="" and copy-namespaces="no" after
getting error "XTDE0440: Cannot output a namespace node for the default namespace when the element is in no namespace" (source lnvxe:footnote with p child)--><xsl:element name="{$siblingNodesParent}" namespace=""><xsl:copy-of select="following-sibling::node()" copy-namespaces="no"/></xsl:element></xsl:variable><!-- recurse --><xsl:sequence select=" lnf:siblingBlockGrouping( $groupingContainer , $blockElements , $siblingNodesUpdated ) "/></xsl:if></xsl:otherwise></xsl:choose></xsl:for-each></xsl:function>
Function
lnf:siblingToParentGrouping (childElements, currentParent)
Documentation
Description
lnf:siblingToParentGrouping Function
This function will pull child elements up to be intermingled with the parent, such
as handling children lnvxe:note elements of "p" in the source converting to p then
lnvxe:note then p then lnvxe:note etc.in the target; for that scenario, the $childElements
= 'lnvxe:note' (the note element), $currentParent would contain the parent that had
one or more $childElements elements needing to be pulled up to the parent level.
Description
siblingBlockGrouping END
@SBy: 2017-01-17 ROM 1218 IRM Strategic: general function to pull child elements up to be intermingled with the parent. For example,
handling children note elements of "p" in the source converting to p then note then p then note etc.in the target
<xsl:function name="lnf:siblingToParentGrouping" as="item()*"><xsl:param name="childElements" as="xs:string*"/><!-- list of element names (such as lnvxe:note) that need to be pulled up and mingled with the parent --><xsl:param name="currentParent" as="element()"/><!-- the current single parent that contains one or more nodes including $childElements --><!-- save name of element parent --><xsl:variable name="currentParentName" as="xs:string" select="name($currentParent)"/><xsl:for-each select="$currentParent/node()[1]"><xsl:choose><!-- if the first node is not an element, OR it is an element but there are no childElements, or it's an element not in childElements; then create currentParent and move on --><xsl:when test=" not(self::*) or ( $childElements = '' ) or not( name() = $childElements ) "><xsl:choose><xsl:when test=" contains( $currentParentName , ':' ) "><xsl:element name="{$currentParentName}"><!-- create container --><xsl:choose><xsl:when test=" $childElements = '' or not( following-sibling::node()[name() = $childElements] ) "><!-- no grouping required; just copy self and all following siblings to output, and no recurse --><xsl:copy-of select="." copy-namespaces="no"/><xsl:copy-of select="following-sibling::node()" copy-namespaces="no"/></xsl:when><xsl:otherwise><xsl:for-each select="following-sibling::node()[name() = $childElements][1]"><!-- grouping required; change context to the first childElements element and then copy over alll preceding siblings; close currentParent --><xsl:copy-of select="preceding-sibling::node()" copy-namespaces="no"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:element></xsl:when><xsl:otherwise><xsl:element name="{$currentParentName}" namespace=""><!-- create container --><xsl:choose><xsl:when test=" $childElements = '' or not( following-sibling::node()[name() = $childElements] ) "><!-- no grouping required; just copy self and all following siblings to output, and no recurse --><xsl:copy-of select="." copy-namespaces="no"/><xsl:copy-of select="following-sibling::node()" copy-namespaces="no"/></xsl:when><xsl:otherwise><xsl:for-each select="following-sibling::node()[name() = $childElements][1]"><!-- grouping required; change context to the first childElements element and then copy over alll preceding siblings; close currentParent --><xsl:copy-of select="preceding-sibling::node()" copy-namespaces="no"/></xsl:for-each></xsl:otherwise></xsl:choose></xsl:element></xsl:otherwise></xsl:choose><!-- if grouping was required in prior section; change context to the first childElements element again to copy over the childElements element, and if necessary initiate recursive call --><xsl:if test=" not( $childElements = '' or not( following-sibling::node()[name() = $childElements] ) ) "><xsl:for-each select="following-sibling::node()[name() = $childElements][1]"><!-- copy over the childElements element --><xsl:copy-of select="." copy-namespaces="no"/><!-- if there are following siblings, need to recurse --><xsl:if test="following-sibling::node()"><!-- update sibling list to be only the remaining following siblings --><xsl:variable name="currentParentUpdated" as="element()"><xsl:element name="{$currentParentName}"><xsl:copy-of select="following-sibling::node()" copy-namespaces="no"/></xsl:element></xsl:variable><!-- recurse --><xsl:sequence select=" lnf:siblingToParentGrouping( $childElements , $currentParentUpdated ) "/></xsl:if></xsl:for-each></xsl:if></xsl:when><!-- first node is an element, AND it is an element that is in childElements. This is the only other possibility, so using xsl:otherwise. Copy myself over, and recurse --><!--xsl:when test=" name() eq $blockElements or name() eq $groupngContainer "--><xsl:otherwise><!-- since we are a childElements element, copy over myself --><xsl:copy-of select="." copy-namespaces="no"/><!-- if there are following siblings, need to recurse --><xsl:if test="following-sibling::node()"><!-- update sibling list to be only the remaining following siblings --><xsl:variable name="currentParentUpdated" as="element()"><xsl:element name="{$currentParentName}"><xsl:copy-of select="following-sibling::node()" copy-namespaces="no"/></xsl:element></xsl:variable><!-- recurse --><xsl:sequence select=" lnf:siblingToParentGrouping( $childElements , $currentParentUpdated ) "/></xsl:if></xsl:otherwise></xsl:choose></xsl:for-each></xsl:function>